+ Reply to Thread
Results 1 to 7 of 7

lookup for a value based on multiple criteria

  1. #1
    Registered User
    Join Date
    01-22-2015
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    2

    lookup for a value based on multiple criteria

    Hi,

    I have 2 worksheets, one is version 2 (latest) and the other is version 1.

    Version 1: I have few columns as below with data input and there are 28 rows of data.
    Date
    Employee ID
    Project
    Workcode
    Hour
    Rate
    Amount
    Invoice No.

    Version 2: I have the same columns as in version 1 but with 40 rows of data (Invoice column is blank).

    :: In version 2 worksheet, I need to copy the invoice number from version 1 based on the exact match of all the columns in version 1.

    If version 1 has 1 row of data but version 2 has 2 row of data with exact value, I need only 1 invoice no. copy to version 2 for 1 of the 2 row of data.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: lookup for a value based on multiple criteria

    HI, welcome to the forum

    Probably the easiest/simplest way to do this would be to create a helper column in each sheet and combine all the relevant columns - then use that in a VLOOKUP() (IF it is the left-most column) or INDEX/MATCH to bring back the value you want

    If you still have a problem, upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    01-22-2015
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    2

    Re: lookup for a value based on multiple criteria

    Hi,

    I have attached a sample excel...

    In version 2 tab, the "Invoice number" is what I need as per highlighted in red. The info is retreived from "Invoice number" in version 1 tab.

    Thanks in advance for the help.

  4. #4
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: lookup for a value based on multiple criteria

    Hi HolyExcel,
    Here are the steps:-
    In J2 put the Invoice Number ie. INV12345

    In K2, Put the
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Then in M2, put
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    as an Array formula, Use CTRL + SHIFT + ENTER to confirm it NOT JUST Enter.

    Drag the formula horizontally till S2 and then Downwards Accordingly to show all matches.
    Check the attached file

    lookup for a value based on multiple criteria.xlsx
    Regards,
    Vikas Gautam
    Excel-buzz.blogspot.com

    Excel is not a matter of Experience, its a matter of Application.

    Say Thanks, Click * Add Reputation

  5. #5
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: lookup for a value based on multiple criteria

    I2=IFERROR(INDEX('Version 1'!$H:$H,SMALL(INDEX(((('Version 1'!$A$2:$A$12<>$A2)+('Version 1'!$B$2:$B$12<>$B2)+('Version 1'!$C$2:$C$12<>$C2)+('Version 1'!$D$2:$D$12<>$D2)+('Version 1'!$E$2:$E$12<>$E2)+('Version 1'!$F$2:$F$12<>$F2))<>0)*10^10+ROW('Version 1'!$A$2:$A$12),0),COUNTIFS(A$2:A2,A2,B$2:B2,B2,C$2:C2,C2,D$2:D2,D2,E$2:E2,E2,F$2:F2,F2,G$2:G2,G2))),"")
    Try this
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  6. #6
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: lookup for a value based on multiple criteria

    can try this too
    I2=IFERROR(INDEX('Version 1'!$H:$H,SMALL(INDEX((MMULT(('Version 1'!$A$2:$G$12<>$A2:$G2)*1,{1;1;1;1;1;1;1})<>0)*10^10+ROW('Version 1'!$A$2:$G$12),0),SUMPRODUCT((MMULT(($A$2:$G2<>A2:G2)*1,{1;1;1;1;1;1;1})=0)*1))),"")
    try this and copy towards down

  7. #7
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Cool Re: lookup for a value based on multiple criteria

    Sorry I misinterpreted it earlier..
    Now Try this..
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Check the attached file:-
    lookup for a value based on multiple criteria (1).xlsx
    Last edited by Vikas_Gautam; 01-29-2015 at 06:13 AM.

+ 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: 9
    Last Post: 08-20-2014, 04:43 PM
  2. [SOLVED] Lookup value based on multiple criteria
    By Kuehl5000 in forum Excel General
    Replies: 3
    Last Post: 06-11-2014, 09:14 AM
  3. [SOLVED] Lookup and sum multiple values based on a single criteria in multiple sheets.
    By paulsanett in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-17-2014, 12:18 PM
  4. [SOLVED] Lookup based on multiple criteria
    By sasindiv in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-04-2013, 09:34 PM
  5. Value Lookup based on Multiple Criteria
    By vanharca in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-01-2012, 11:22 AM

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