+ Reply to Thread
Results 1 to 4 of 4

I want to compare last week's data to current data (sheets are named by date)

  1. #1
    Registered User
    Join Date
    06-18-2012
    Location
    Wodonga, Australia
    MS-Off Ver
    Excel 2003
    Posts
    3

    I want to compare last week's data to current data (sheets are named by date)

    I have a file with a sheet for each day of the year and want to compare the current data to the prior week. I am trying to do this by using the sheet name so that when I copy and rename the week's sheets, the correct links will be preserved (at the moment, I am changing the sheet name manually). I have a formula that can get the sheet name and cell, using the current sheet name less 7, but I don't seem to be able to use that in a formula? e.g. = "'"&text(b2-7,"d-mmm-yy")&"!'D84". Or should I be using a vlookup with a variable sheet name somehow?

  2. #2
    Valued Forum Contributor
    Join Date
    10-17-2010
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013, 2016, 2019, 365
    Posts
    294

    Re: I want to compare last week's data to current data (sheets are named by date)

    Try using the INDIRECT() function. INDIRECT("'"&text(b2-7,"d-mmm-yy")&"!'D84") might do the trick for you.

  3. #3
    Registered User
    Join Date
    06-18-2012
    Location
    Wodonga, Australia
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: I want to compare last week's data to current data (sheets are named by date)

    Quote Originally Posted by outofthehat View Post
    Try using the INDIRECT() function. INDIRECT("'"&text(b2-7,"d-mmm-yy")&"!'D84") might do the trick for you.
    I tried this but I got a #REF error?

  4. #4
    Registered User
    Join Date
    06-18-2012
    Location
    Wodonga, Australia
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: I want to compare last week's data to current data (sheets are named by date)

    It does work actually - I had the '! around the wrong way.... I ended up with =INDIRECT("'"&TEXT($B$2-7,"d-mmm-yy")&"'!"&CELL("address",B84))

    Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1