+ Reply to Thread
Results 1 to 6 of 6

Worksheet names as variables

  1. #1
    Registered User
    Join Date
    12-13-2007
    Posts
    4

    Worksheet names as variables

    If I have:

    data in cell A1
    worksheets: monday,tuesday wednesday, thursday, friday saturday, sunday;
    aworsheet named: "weekly summary"

    how can i write a formula to return the data from the correct A1 cell if I type the day of the week in the "weekly summary" worksheet?

    PLEASE HELP ME!!

  2. #2
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    If you want to return the value of A1 in the Sunday sheet by typing "Sunday" in cell B1, you could use:

    =INDIRECT(B1&"!A1")

    HTH

    Jason

  3. #3
    Registered User
    Join Date
    12-13-2007
    Posts
    4

    And carrying on...

    Cheers Jason,

    That worked well, but what it my A1 was in a different workbook?

    Jeffrey

  4. #4
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    Good question. I can't seem to get it to work unless the other referenced workbook is open. If it is closed, it returns #REF!. If you want to reference an opened workbook, you could use something like:

    =INDIRECT("[Book1.xls]"&B1&"!A1")

    HTH

    Jason

  5. #5
    Registered User
    Join Date
    12-13-2007
    Posts
    4

    Got it

    Cheers mate, got it all done. works out well!

  6. #6
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    Glad it helped.

    Jason

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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