+ Reply to Thread
Results 1 to 6 of 6

Ref. a cell in a formula

  1. #1
    Registered User
    Join Date
    08-31-2011
    Location
    Salt Lake City, UT
    MS-Off Ver
    Excel 2003
    Posts
    14

    Ref. a cell in a formula

    Hello-

    I am trying to reference a cell's contents in a formula. The cell is located in the same sheet but references a cell from another sheet.

    Current formula: =LOOKUP(FHC!$A$2,$F$2:$F$13,$H$2:$H$13)

    I would like to replace the "FHC! with the cell's contents found in F15 of the current sheet where the formula is found, sheet "admin".

    Thanks for the help in advance.

    -EW

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Ref. a cell in a formula

    You mean like:

    =LOOKUP(F15,$F$2:$F$13,$H$2:$H$13)

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Ref. a cell in a formula

    The INDIRECT() function should serve.

    =LOOKUP(INDIRECT("'" & Admin!$F$15 & "'!$A$2"),$F$2:$F$13,$H$2:$H$13)

    =LOOKUP(INDIRECT("'" & $F$15 & "'!$A$2"),$F$2:$F$13,$H$2:$H$13)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Registered User
    Join Date
    08-31-2011
    Location
    Salt Lake City, UT
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Ref. a cell in a formula

    Quote Originally Posted by zbor View Post
    You mean like:

    =LOOKUP(F15,$F$2:$F$13,$H$2:$H$13)
    No dice, that just gives the cell as a reference but doesn't use the contents which is the sheet's name which the rest of the formula refers to.

  5. #5
    Registered User
    Join Date
    08-31-2011
    Location
    Salt Lake City, UT
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Ref. a cell in a formula

    Quote Originally Posted by JBeaucaire View Post
    The INDIRECT() function should serve.

    =LOOKUP(INDIRECT("'" & Admin!$F$15 & "'!$A$2"),$F$2:$F$13,$H$2:$H$13)

    =LOOKUP(INDIRECT("'" & $F$15 & "'!$A$2"),$F$2:$F$13,$H$2:$H$13)

    This gives the result in "TRUE" but should give a different result.

  6. #6
    Registered User
    Join Date
    08-31-2011
    Location
    Salt Lake City, UT
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Ref. a cell in a formula

    Quote Originally Posted by wagnered View Post
    This gives the result in "TRUE" but should give a different result.
    OK, so I take it all back...great formula! Thank you!



+ 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