+ Reply to Thread
Results 1 to 3 of 3

Vlookup/Indirect Address Question

  1. #1
    Registered User
    Join Date
    06-17-2005
    Posts
    1

    Vlookup/Indirect Address Question

    Hello,

    I have a quick question.

    So I have three inputs into a formula. In Sheet1, The values in cells A1, B1, and C1.. I want to output to cell D1

    Somewhere in column A of sheet 2 is the value of A1 (to be looked up). Once this value is found, i want the cell next to it or two spaces next to it depending on the value in B1 (of sheet1)

    The value in cell C1 contains the name of the sheet to lookup a value in. Using Vlookup, this is a pretty straightforward question except that the sheet is not manually chosen. It is dependent on the value in C1 (C1 is the name of the sheet as a string).

    What it comes down to, when typing in something like Sheet1!A1:E1.. how do I replace "Sheet1" with a variable string? How can I do this?

    Thank you so much for your help!

  2. #2
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474
    Try something like this...

    =VLOOKUP(A1,INDIRECT("'"&C1&"'!A1:E100"),B1,0)

    Hope this helps!

    Quote Originally Posted by deriv3
    Hello,

    I have a quick question.

    So I have three inputs into a formula. In Sheet1, The values in cells A1, B1, and C1.. I want to output to cell D1

    Somewhere in column A of sheet 2 is the value of A1 (to be looked up). Once this value is found, i want the cell next to it or two spaces next to it depending on the value in B1 (of sheet1)

    The value in cell C1 contains the name of the sheet to lookup a value in. Using Vlookup, this is a pretty straightforward question except that the sheet is not manually chosen. It is dependent on the value in C1 (C1 is the name of the sheet as a string).

    What it comes down to, when typing in something like Sheet1!A1:E1.. how do I replace "Sheet1" with a variable string? How can I do this?

    Thank you so much for your help!

  3. #3
    Harlan Grove
    Guest

    Re: Vlookup/Indirect Address Question

    deriv3 wrote...
    ....
    >Somewhere in column A of sheet 2 is the value of A1 (to be looked up).
    >Once this value is found, i want the cell next to it or two spaces next
    >to it depending on the value in B1 (of sheet1)
    >
    >The value in cell C1 contains the name of the sheet to lookup a value
    >in. Using Vlookup, this is a pretty straightforward question except
    >that the sheet is not manually chosen. It is dependent on the value in
    >C1 (C1 is the name of the sheet as a string).

    ....

    =VLOOKUP(A1,INDIRECT("'"&C1&"'!A:C"),B1,0)


+ 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