+ Reply to Thread
Results 1 to 4 of 4

Reverse lookup with only one search criteria

  1. #1
    Registered User
    Join Date
    08-11-2017
    Location
    England
    MS-Off Ver
    2010
    Posts
    5

    Reverse lookup with only one search criteria

    Hi everyone,
    I have a problem which I'm sure should be simple to solve but for the life of me I can't work it out.

    Below is a snippet of the workbook I'm using, I've combined parts of two sheets into one for this photo:
    On the right hand side is a list of orders being exported from our site.
    On the left is a table of the various product codes we are using.

    All we want to do if for the cell K3 to display the correct product type based on the number in J3 and the table on the left. The amount of products will continue to expand, so it needs to be dynamic.

    I've been using index & match when using a matrix and I have two search criteria, but I'm struggling to solve this with only one.

    Really appreciate any help.

    Thank you,

    Capture.JPG
    Attached Files Attached Files

  2. #2
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: Reverse lookup with only one search criteria

    I think that this is what you are looking for: =INDEX($A$1:$C$1,SUMPRODUCT(MAX(($A$2:$C$11=$K2)*(COLUMN($A$2:$C$11))))-COLUMN($A$1)+1)
    Wrap it in a iferror to get rid of errors
    Click the * to say thanks.

  3. #3
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Reverse lookup with only one search criteria

    in K3
    =INDEX($A$1:$C$1,AGGREGATE(15,6,(COLUMN($A$2:$C$11)-COLUMN($A$2)+1)/($A$2:$C$11=K2),1))
    and copy down the column

    Your actual spreadsheet contains product No.s that do not appear in the main table on the left of the spreadsheet hence the #NUM errors.
    Fix that and everything should work.
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  4. #4
    Registered User
    Join Date
    08-11-2017
    Location
    England
    MS-Off Ver
    2010
    Posts
    5

    Re: Reverse lookup with only one search criteria

    Quote Originally Posted by Special-K View Post
    in K3
    =INDEX($A$1:$C$1,AGGREGATE(15,6,(COLUMN($A$2:$C$11)-COLUMN($A$2)+1)/($A$2:$C$11=K2),1))
    and copy down the column

    Your actual spreadsheet contains product No.s that do not appear in the main table on the left of the spreadsheet hence the #NUM errors.
    Fix that and everything should work.
    Yeah sorry about that, was just a bunch of dummy data.
    Thanks for the advice though mate.

    Quote Originally Posted by PaulM100 View Post
    I think that this is what you are looking for: =INDEX($A$1:$C$1,SUMPRODUCT(MAX(($A$2:$C$11=$K2)*(COLUMN($A$2:$C$11))))-COLUMN($A$1)+1)
    Wrap it in a iferror to get rid of errors
    Cheers buddy. As soon as I get a second I'll give it a go.

    Really appreciate the help.

+ 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] 2 variable search criteria lookup on different tabs? Help!
    By amajor99 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-09-2018, 01:55 PM
  2. [SOLVED] Search Lookup with multiple criteria
    By NotSwank in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-11-2014, 03:37 PM
  3. Replies: 7
    Last Post: 08-04-2013, 03:41 PM
  4. Match/Index/Lookup - Searching From Bottom to Top (A reverse lookup maybe)
    By Neutralizer in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-02-2013, 03:55 AM
  5. [SOLVED] Lookup formula required to search for two criteria and return result
    By dave1983 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-12-2012, 03:29 PM
  6. [SOLVED] multi-criteria search lookup fail
    By zfl in forum Excel General
    Replies: 4
    Last Post: 06-16-2012, 09:26 AM
  7. multiple lookup based on two search criteria
    By maacmaac in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-28-2010, 03:33 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