+ Reply to Thread
Results 1 to 4 of 4

Lookup based on Two Variables in Multiple Worksheets

  1. #1
    Registered User
    Join Date
    11-05-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    10

    Lookup based on Two Variables in Multiple Worksheets

    Hi all,

    Please could someone assist me, as I'm struggling with the following? thanks!

    - I have 3 tabs: Combined, Type 1 and Type 2
    - Each tab includes data based on 3 columns: Region, Identification number and Service Start/Change Date

    I would like the 'Combined' tab to display the correct 'Service Start/Change Date' based on the 'Region' and 'Identification Number' from both 'Type 1' and 'Type 2' tabs, respectively.

    I've tried using VLOOKUP but having looked on-line I think INDEX & MATCH or INDIRECT is a better option, unless I'm mistaken?

    I've attached the spreadsheet. Any feedback is greatly appreciated!

    Regards
    jusmightmightbeokay
    Attached Files Attached Files

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Lookup based on Two Variables in Multiple Worksheets

    Hi,

    Can you just clarify what you mean by "I would like the 'Combined' tab to display the correct 'Service Start/Change Date' based on the 'Region' and 'Identification Number' from both 'Type 1' and 'Type 2' tabs, respectively."?

    For example, Region 23/Y12-143 appears in both the Type 1 and Type 2 sheets - what is your desired result here? Simiilarly for Y12-143 with Region Coverage Region 29, Region 41, Region 42, etc.

    Also, what about cases where the same Region Coverage and Identification Number appears more than once on the same sheet, e.g. Region 30/Y13-051, which appears twice on the Type 1 tab?

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

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

    Re: Lookup based on Two Variables in Multiple Worksheets

    Put this array* formula in cell C2 of the Combined sheet:

    =IFERROR(INDEX('Type 1'!C$2:C$90,MATCH(A2&B2,'Type 1'!A$2:A$90&'Type 1'!B$2:B$90,0)),IFERROR(INDEX('Type 2'!C$2:C$90,MATCH(A2&B2,'Type 2'!A$2:A$90&'Type 2'!B$2:B$90,0)),""))

    then copy down.

    NOTE: an array formula needs to be committed using the key combination of Ctrl-Shift-Enter (CSE), rather than the usual <Enter>.

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    11-05-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Lookup based on Two Variables in Multiple Worksheets

    That is spectacular, many thanks Pete_UK.

    To XOR LX, the Region and Identification number should be consistent. After adding the array formula I can see I have an error with one of the Identification numbers, namely Y13-043, which should read as Y12-043!!

    Many thanks again for the swift response.

    Regards
    jusmightbeokay

+ 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. Multiple Variables for Lookup and List
    By capitalsfan in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-25-2013, 05:20 PM
  2. [SOLVED] Lookup all cells with a certain value, then take a value based on two other variables
    By EpsilonSigma in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-21-2013, 10:28 AM
  3. [SOLVED] lookup formula for multiple variables
    By jrtaylor in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-16-2012, 10:27 PM
  4. Lookup up multiple variables
    By Notters in forum Excel General
    Replies: 4
    Last Post: 02-24-2010, 06:47 PM
  5. Lookup (multiple variables)
    By stevenpwhite in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-16-2005, 08:40 AM

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