+ Reply to Thread
Results 1 to 6 of 6

vlookup location based on adjacent cell

  1. #1
    Registered User
    Join Date
    09-18-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    47

    vlookup location based on adjacent cell

    Not sure how to approach this but here is the issue. I have 2 adjacent cells, the first cell will point to a worksheet in the active workbook, the second cell will point to an item to lookup. What I am trying to figure out is how i can use a formula(or VBA) that will first choose the worksheet based on the value in column A, then use a vlookup(or similar) from the value in column B.

    I have attached an example of a worksheet. Any help would be greatly appreciated.
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,714

    Re: vlookup location based on adjacent cell

    You can use this formula:

    =VLOOKUP(B2,INDIRECT("'"&A2&"'!A:B"),2,0)

    then copy down as required.

    Hope this helps.

    Pete

  3. #3
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628

    Re: vlookup location based on adjacent cell

    You could use this formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Regards,
    Antonio

  4. #4
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628

    Re: vlookup location based on adjacent cell

    Excuse me @Pete_UK, I gave the same answer of you but I didn't copy you.

    Regards,
    Antonio

  5. #5
    Registered User
    Join Date
    09-18-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: vlookup location based on adjacent cell

    Awesome thanks guys

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,714

    Re: vlookup location based on adjacent cell

    @Antonio,

    don't worry about it. My formula is slightly different, as I included apostrophes around the sheet name.

    Pete

+ 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. Replies: 3
    Last Post: 07-21-2015, 05:10 PM
  2. [SOLVED] Add Comment Based on adjacent cell value (vlookup?)
    By astinn in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-11-2015, 08:45 PM
  3. Trying to updated sheet based of location returned by Vlookup
    By mds219 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 01-06-2014, 12:43 AM
  4. [SOLVED] variable cell location for VLOOKUP
    By kerradeph in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-27-2013, 01:46 PM
  5. Replies: 5
    Last Post: 12-19-2012, 09:16 AM
  6. Vlookup with file location in different cell
    By Sharp in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-08-2008, 02:41 PM
  7. [SOLVED] Find Cell and Copy adjacent value to another location
    By JJalomo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-08-2005, 04:06 PM

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