Reference to the previous sheet

Dbutant -  
eriiic Posted messages 24581 Registration date   Status Contributor Last intervention   -
Hello,
I am facing two issues with Google Sheets.
I have a file with several weeks noted as 02/07; 09/07; 16/07, etc.
I would like to be able to refer to a cell from the previous sheet without having to constantly type the name of the previous week in the formula. Automate this process in a way so I can duplicate my weeks by just changing the name of the week. Basically, I would like a formula that allows me to refer to the previous sheet.

2nd issue:
I would also like to create a conditional formatting rule that refers to the previous week (essentially, if the value for this week is greater than last week's value, the cell should turn green).

I hope I have been clear enough; I am quite a novice with spreadsheets.

Configuration: Windows / Chrome 67.0.3396.99

1 answer

  1. eriiic Posted messages 24581 Registration date   Status Contributor Last intervention   7 281
     
    Hello,

    I suppose that your date of 09/07 (from this sheet) is in your sheet, let's imagine in A2. To get C15 from the previous sheet:
    =INDIRECT("'"&TEXTE(A2-7;"jj-mm")&"'!C15")

    I had to name the sheets jj-mm, as excel does not accept jj/mm as a name.
    eric
    By continuously trying, we eventually succeed.
    So the more it fails, the more chances we have that it works. (the Shadoks)
    In addition to the thank you (yes, yes, it happens!!!), remember to mark it as resolved. Thank you.
    0
    1. Dbutant
       
      Hello and thank you for this response

      Unfortunately, it does not solve my problem. To be extremely precise, my sheets are named S1 09/07; S2 16/07 C3; S3 23/07; S4 30/07; S5 06/08 C4
      And so on.

      Is there really no formula that directly references a cell from the previous sheet?

      Thank you again for your response.
      0
    2. eriiic Posted messages 24581 Registration date   Status Contributor Last intervention   7 281
       
      Hello,

      We need to be more consistent with the names. Excel can generate according to known rules, it cannot invent.

      Otherwise, here’s a custom function I created: https://mon-partage.fr/f/gFKvmWfJ/
      eric
      0