Thanks Thanks:  0
Likes Likes:  0
Results 1 to 8 of 8

Thread: formula using sheet name

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Location
    Fort McMurray, AB
    Posts
    218
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hey folks,

    I think I've seen this but can't find it...

    I've got a table on sheet1 that has a list of names running from B2:B12. Each name has its own sheet with the same name.

    I want to create a formula in C2 that allows me to copy down to C12 by going to the same cell on each sheet for each name.

    I tried variations of =("'"&B2&"'"&"!"$E$22) but to no avail.

    Thanks to whoever can come up with this.
    Regards, Duane
    Office2010 in Win7

  2. #2
    Board Regular
    Join Date
    Feb 2002
    Location
    Perth Australia
    Posts
    1,584
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi Duane

    Try:
    =INDIRECT(B2&"!$E$22")

    regards
    Derek

  3. #3
    Board Regular
    Join Date
    Mar 2002
    Location
    Fort McMurray, AB
    Posts
    218
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thanks, but I got a #REF error...?
    Regards, Duane
    Office2010 in Win7

  4. #4
    Board Regular
    Join Date
    Feb 2002
    Location
    Guderup, Denmark
    Posts
    288
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Dereks answer should work.
    Are you, by any chance, trying to get data from another workbook??

    regards Tommy

  5. #5
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Newcastle, UK
    Posts
    1,174
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    In you orginal question your referencing $E$22 on sheet1 of the book, in Derek's formula:

    =INDIRECT(B2&"!$E$22")
    it's looking for the name in B2 & "!$E$22"

    i.e. Sheet2!$E$22

    as in at E22 on sheet2. is this what you need, if not use

    =INDIRECT(B2&"!"&$E$22)

    this still wouldn't make any difference to the ref error.

    Check to see if:

    a: the name is exactly as the sheet name you want

    b: there are no spaces before or after the names in the cells.
    "Have a good time......all the time"
    Ian Mac

  6. #6
    Board Regular
    Join Date
    Mar 2002
    Location
    Fort McMurray, AB
    Posts
    218
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hey fellas,

    It's the strangest thing... When I use a name that is one word, such as "James", and name the sheet the same, Derek's formula works.

    When I name it the full name, as in "James Bond" it gives me the error - what, does Excel not like 007?!

    [ This Message was edited by: Duane on 2002-04-04 11:07 ]

  7. #7
    MrExcel MVP Aladin Akyurek's Avatar
    Join Date
    Feb 2002
    Location
    The Hague, NL
    Posts
    84,042
    Post Thanks / Like
    Mentioned
    38 Post(s)
    Tagged
    8 Thread(s)

    Default

    On 2002-04-04 11:01, Duane wrote:
    Hey fellas,

    It's the strangest thing... When I use a name that is one word, such as "James", and name the sheet the same, Derek's formula works.

    When I name it the full name, as in "James Bond" it gives me the error - what, does Excel not like 007?!

    [ This Message was edited by: Duane on 2002-04-04 11:07 ]
    Try:

    =INDIRECT("'"&B2&"'!E22")

    Aladin

  8. #8
    Board Regular
    Join Date
    Mar 2002
    Location
    Fort McMurray, AB
    Posts
    218
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thanks to all of you, the mistake was mine, in that I referenced the wrong cell (should have been E2, not E22).

    I got it working using both =INDIRECT("'"&B2&"'!E2") and =INDIRECT(B2&"!$E$22")

    Much thanks!


    Regards, Duane
    Office2010 in Win7

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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