+ Reply to Thread
Results 1 to 5 of 5

Reference Cell as Sheet Name in Formula

  1. #1
    Registered User
    Join Date
    06-17-2014
    Location
    Columbus, OH
    MS-Off Ver
    2010
    Posts
    9

    Reference Cell as Sheet Name in Formula

    Hi all,

    I am stumped by this problem. I would like to dynamically insert a worksheet name into a formula. I thought the easiest way would be to type the sheet names into cells in the same row as the formula and then reference that cell to provide the sheet name. However, I cannot for the life of me get it to work.

    =OFFSET(A7&"!"&$D$7,0,ROW()-25)
    Value of Cell A7 = XPE


    I want it to say =OFFSET(XPE!$D$7,0,ROW()-25)

    Is this even possible? Perhaps it is returning the value of D7 in my current worksheet first?

    Thank you for any advice.

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Reference Cell as Sheet Name in Formula

    =offset(indirect("'"&a7&"'!d7"),0,row()-25)
    Last edited by martindwilson; 12-19-2014 at 01:09 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Reference Cell as Sheet Name in Formula

    Try

    =OFFSET(INDIRECT(A7&"!$D$7"),0,ROW()-25)
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  4. #4
    Registered User
    Join Date
    06-17-2014
    Location
    Columbus, OH
    MS-Off Ver
    2010
    Posts
    9

    Re: Reference Cell as Sheet Name in Formula

    Both work!! Thanks a ton guys, you guys are awesome.

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Reference Cell as Sheet Name in Formula

    thanks for the feedback,glad we could help

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Use cell reference on one sheet as a sheet name in a formula on another sheet
    By GavJ in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-10-2013, 05:06 AM
  2. Use cell value as reference to sheet in formula?
    By bluegnu in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-19-2013, 02:23 PM
  3. Dragging formula, change sheet reference, but not cell reference
    By Kalilaya0419 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-13-2013, 04:50 PM
  4. How can I reference a cell in on sheet as a formula in another
    By hanburym in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-18-2012, 12:17 PM
  5. [SOLVED] Need formula for sheet & cell reference
    By MPH in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-16-2005, 09:07 PM

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