+ Reply to Thread
Results 1 to 6 of 6

Using VLOOKUP with multiple sheets with flexible sheet names

  1. #1
    Registered User
    Join Date
    11-03-2020
    Location
    Colombo, Sri Lanka
    MS-Off Ver
    2019
    Posts
    18

    Post Using VLOOKUP with multiple sheets with flexible sheet names

    Hello,

    I have a master worksheet, which needs to fetch the last values of a column from another sheet (in the same workbook).

    My special requirement is that the sheet names are given in Column A in the master Worksheet, and the VLOOKUP formula should get the sheet names from that column.

    This is because the master "Worksheet" is permanent, but the other sheets gets added removed occasionally.

    Attached is the sample file.

    Thanks for any help!
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Using VLOOKUP with multiple sheets with flexible sheet names

    Hi,

    One way in B2 copied to B3

    =INDEX(INDIRECT("'"&A2&"'!B:B"),COUNTA(INDIRECT("'"&A2&"'!B:B")),1)
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

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

    Re: Using VLOOKUP with multiple sheets with flexible sheet names

    The example numbers that you show in sheets AD and EH are all sorted in increasing order, so the last number in column B on both sheets is also the largest number. Is this always the case? If so, you could use MAX to find the last number, or you could use LOOKUP, as in these two examples:

    =MAX(INDIRECT("'"&A2&"'!B1:B100"))

    =LOOKUP(9999,INDIRECT("'"&A2&"'!B1:B100"))

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    11-03-2020
    Location
    Colombo, Sri Lanka
    MS-Off Ver
    2019
    Posts
    18

    Re: Using VLOOKUP with multiple sheets with flexible sheet names

    Wow, that was an insanely fast reply. Thank you so much, Richard. This seems to do what I need. Cheers!

  5. #5
    Registered User
    Join Date
    11-03-2020
    Location
    Colombo, Sri Lanka
    MS-Off Ver
    2019
    Posts
    18

    Re: Using VLOOKUP with multiple sheets with flexible sheet names

    No Pete, not always the case. Thanks for the reply anyways. Cheers!

  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,723

    Re: Using VLOOKUP with multiple sheets with flexible sheet names

    Well, the second one will give you what you want.

    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. [SOLVED] Look up across multiple sheets without referring sheet names
    By Shareez Saleem in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-10-2021, 02:27 AM
  2. [SOLVED] Renaming multiple sheets by table names within each sheet
    By Brendon Waters in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-24-2020, 02:11 AM
  3. [SOLVED] more flexible way to select multiple sheets
    By lynnsong986 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-19-2019, 02:25 AM
  4. [SOLVED] Copy Paste From Rawdata Sheets to Multiple Sheets Based on Sheet names
    By farrukh in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-16-2017, 11:01 PM
  5. [Question] Sumifs multiple sheets with flexible sheets reference
    By tranhaithang in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-29-2014, 04:53 AM
  6. List of names in one sheet corresponding to multiple sheets
    By jones.mattew in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-12-2013, 08:34 AM
  7. VLOOKUP to look through multiple sheets and return the sheet names
    By ackimbrough in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-26-2011, 03:55 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