+ Reply to Thread
Results 1 to 8 of 8

Finding the closest match from 3 corresponding lists

  1. #1
    Registered User
    Join Date
    10-31-2018
    Location
    London, England
    MS-Off Ver
    2016
    Posts
    4

    Finding the closest match from 3 corresponding lists

    Hi Guys,

    First time posting here! I have been struggling with this for a while now trying to work it out on my own, but to no avail, so I am hoping someone here can help!

    I work for a packaging company, and we sell hundreds of different boxes in different sizes and shapes. On a daily basis, we receive requests from customers giving there required box dimensions, and we have to go through all the products, checking the dimensions, to find the closest match.

    I was hoping to create a spreadsheet whereby I can insert the customers required Height in one cell, required Depth in the next cell and required Length in the next cell, and it will perform a search which would bring back the product code with the closest corresponding dimensions. The formula would need to take in to account all 3 criteria.

    I have tried using MAX(IF(, but I cannot get it to work across multiple criteria - I am pulling my hair out aha!

    I have attached a small example of what I need - Column A is the product code, Column B is the Length, Column C is the With, Column D is the Height - These would be the raw data that would be hidden.

    Cell H2 is where myself or a colleague would input the customers required Length, I2 is for the customers required Width and J2 is for the customers required Height. L2 is where I would like the resulting product code to be (where I assume I would input the formula)

    If anyone can help that would be AMAZING!

    Thank you,

    Simon
    Attached Files Attached Files

  2. #2
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Finding the closest match from 3 corresponding lists

    =IFERROR(INDEX($A:$A,AGGREGATE(15,6,ROW($A$2:$A$140)/($H2<=$B$2:$B$140)/($I2<=$C$2:$C$140)/($J2<=$D$2:$D$140),1)),"nomatch")

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,658

    Re: Finding the closest match from 3 corresponding lists

    ... and welcome to the forum!
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  4. #4
    Registered User
    Join Date
    10-31-2018
    Location
    London, England
    MS-Off Ver
    2016
    Posts
    4

    Re: Finding the closest match from 3 corresponding lists

    Hi Tim, thank you so much for your reply! It seems to work half of the time, but if you see attached file (I have applied your formula to a working file), from the dimensions of 200 x 200 x 200, it has given me SLC12, which has dimensions of 410 x 310 x 395, however the S6H has dimensions of 330 x 285 x 205, which would be the closest match - Are you able to advise please? Thank you so much again!
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    10-31-2018
    Location
    London, England
    MS-Off Ver
    2016
    Posts
    4

    Re: Finding the closest match from 3 corresponding lists

    Thank you!!

  6. #6
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Finding the closest match from 3 corresponding lists

    =IFERROR(INDEX($A:$A,AGGREGATE(15,6,ROW($A$2:$A$140)/($H2<=$B$2:$B$140)/($I2<=$C$2:$C$140)/($J2<=$D$2:$D$140),COLUMNS($K$2:K$2))),"nomatch")
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    10-31-2018
    Location
    London, England
    MS-Off Ver
    2016
    Posts
    4

    Re: Finding the closest match from 3 corresponding lists

    Thank you so much, works like a charm

    Just out of curiosity, this may not be the right place, but one of my colleagues does not have Excel on his home laptop (ridiculous, I know!) and only has google sheets - It does not seem to work in Google sheets, do you know why that would be? It is coming up as "#NAME?"

    Any help would be greatly appreciated!

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,658

    Re: Finding the closest match from 3 corresponding lists

    It will be one of the functions - a pure guess would be AGGREGATE.

+ 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. Finding closest match data
    By jinmatahari in forum Excel General
    Replies: 10
    Last Post: 11-29-2018, 09:54 PM
  2. Replies: 0
    Last Post: 07-11-2012, 11:06 AM
  3. Finding the closest match between two columns within a given range.
    By cfletcher in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-11-2012, 10:37 AM
  4. Finding a closest match with more than one criteria
    By Jayana in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-15-2011, 06:45 PM
  5. Finding next closest match
    By nasir3100 in forum Excel General
    Replies: 1
    Last Post: 04-26-2009, 02:04 AM
  6. Finding Closest Match (VLookup is no good)
    By nibix in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-13-2008, 04:48 PM
  7. Finding Closest Match
    By andyiain in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-15-2006, 03:25 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