SOLVED
Home

Excel Lookup function multiple criteria

%3CLINGO-SUB%20id%3D%22lingo-sub-216089%22%20slang%3D%22en-US%22%3EExcel%20Lookup%20function%20multiple%20criteria%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-216089%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Apologies%20if%20this%20query%20is%20already%20answered%20but%20I%20cant%20for%20the%20life%20of%20me%20find%20it!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20want%20to%20interrogate%20the%20table%20for%20a%20specific%20search%20string%20generated%20from%20multiple%20drop%20downs%20and%20display%20the%20correct%20result%20In%20cell%20%22N2%22.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20%22INDEX%20MATCH%22%20the%20best%20way%20to%20do%20this.%20any%20help%20much%20appreciated%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMW%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-216089%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20%26amp%3B%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ETutorial%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-216960%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Lookup%20function%20multiple%20criteria%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-216960%22%20slang%3D%22en-US%22%3E%3CP%3EHi!%3C%2FP%3E%3CP%3Etwo%20variable%20v-lookup%20created%20this%20video%2C%20may%20pls%20see%20if%20it%20helps.%3C%2FP%3E%3CP%3ELink%3A%20%3CA%20href%3D%22https%3A%2F%2Fyoutu.be%2FgSwvCEviqLQ%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fyoutu.be%2FgSwvCEviqLQ%3C%2FA%3E%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-216910%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Lookup%20function%20multiple%20criteria%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-216910%22%20slang%3D%22en-US%22%3E%3CDIV%20class%3D%22lia-message-body%20lia-tooltip-trigger%22%3E%3CDIV%20class%3D%22lia-message-body-content%22%3E%3CP%3EHi%20-%20was%20hoping%20you%20could%20help%20me%20again...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20taken%20your%20previous%20advice%20and%20incorporated%20it%20into%20attached%20spreadsheet.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20then%20simplified%20the%20lookup%20generator%20by%20creating%20variable%20drop%20down%20lists%20and%20removing%20duplicates%20with%20name%20range%20formula.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20want%20to%20take%20the%20drop%20down%20data%20validation%20to%20next%20level%20by%20enforcing%20only%20possible%20selections%20that%20exist%20in%20the%20table.%20Hope%20Im%20making%20sense%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20again%3C%2FP%3E%3CP%3EMark%3C%2FP%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CDIV%20class%3D%22AddMessageTags%20lia-message-tags%20lia-component-message-view-widget-tags%22%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-216909%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Lookup%20function%20multiple%20criteria%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-216909%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20-%20was%20hoping%20you%20could%20help%20me%20again...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20taken%20your%20previous%20advice%20and%20incorporated%20it%20into%20attached%20spreadsheet.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20then%20simplified%20the%20lookup%20generator%20by%20creating%20variable%20drop%20down%20lists%20and%20removing%20duplicates%20with%20name%20range%20formula.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20want%20to%20take%20the%20drop%20down%20data%20validation%20to%20next%20level%20by%20enforcing%20only%20possible%20selections%20that%20exist%20in%20the%20table.%20Hope%20Im%20making%20sense%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20again%3C%2FP%3E%3CP%3EMark%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-216351%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Lookup%20function%20multiple%20criteria%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-216351%22%20slang%3D%22en-US%22%3E%3CP%3EYour%20an%20absolute%20star!!!!!%20Works%20perfectly......%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20and%20much%20appreciated%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMark%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-216337%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Lookup%20function%20multiple%20criteria%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-216337%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Ethat%20sample%20file%20is%20really%20helpful.%26nbsp%3B%20I%20can%20suggest%20two%20approaches%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EApproach%201%3A%20use%20a%20helper%20column%20where%20you%20combine%20all%20the%20lookup%20criteria%20into%20a%20lookup%20key.%20Insert%20a%20new%20column%20after%20F%20and%20in%20the%20new%20column%20G%20enter%20this%20formula%20in%20row%202%20and%20copy%20down%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3DA2%26amp%3BB2%26amp%3BC2%26amp%3BE2%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIt%20combines%20all%20the%20values%20to%20one%20lookup%20key.%20Now%20you%20can%20refer%20to%20that%20lookup%20key%20in%20an%20Index%2FMatch%20combination%20formula%20in%20cell%20M2%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3DINDEX(%24F%242%3A%24F%2413%2CMATCH(I2%26amp%3BJ2%26amp%3BK2%26amp%3BL2%2C%24G%242%3A%24G%2413%2C0))%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOr%2C%20if%20you%20don't%20want%20to%20use%20the%20helper%20column%2C%20you%20can%20do%20it%20all%20in%20one%20step%2C%20but%20the%20result%20may%20take%20a%20while%20to%20calculate%20if%20you%20have%20many%20rows%20of%20data.%20I'm%20still%20taking%20into%20account%20that%20a%20column%20G%20was%20added%2C%20so%20the%20cell%20references%20are%20a%20bit%20different%20from%20your%20original%20layout%2C%20but%20you%20can%20see%20it%20working%20in%20the%20attached%20file.%20In%20cell%20M3%20I%20use%20the%20formula%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3DINDEX(%24F%242%3A%24F%2413%2CMATCH(I3%26amp%3BJ3%26amp%3BK3%26amp%3BL3%2CINDEX(%24A%242%3A%24A%2413%26amp%3B%24B%242%3A%24B%2413%26amp%3B%24C%242%3A%24C%2413%26amp%3BE2%3AE13%2C0)%2C0))%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFile%20is%20attached.%20Let%20me%20know%20if%20that%20helped.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-216289%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Lookup%20function%20multiple%20criteria%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-216289%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20for%20replys%20-%20I've%20attached%20a%20version%20of%20the%20file%20which%20should%20explain%20what%20I%20mean%20better.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAt%20the%20moment%20the%20table%20isn't%20very%20large%20but%20could%20eventually%20run%20into%20hundreds%20of%20rows%20of%20data%20to%20interrogate%2C%20hence%20the%20need%20for%20an%20intelligent%20lookup.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMuch%20appreciated%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-216205%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Lookup%20function%20multiple%20criteria%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-216205%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eplease%20post%20a%20data%20sample.%20Mock%20up%20the%20expected%20result%2C%20so%20we%20know%20what%20we%20are%20aiming%20for.%20You%20can%20upload%20a%20workbook%20to%20the%20thread%20here.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-216181%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Lookup%20function%20multiple%20criteria%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-216181%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20%22Index%20Match%22%20function%20is%20perfect%20if%20you%20have%20a%20double%20side%20entry%20table%20i.e.%20columns%20with%20options%20A%20B%20C%20D...%20and%20rows%20with%20options%201%202%203%204...%20(as%20excel%20itself).%20In%20that%20case%2C%20if%20you%20insert%20a%20letter%20and%20a%20number%2C%20%22index%20match%22%20will%20give%20you%20the%20exact%20cell%20you%20need.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20obviously%20works%20even%20with%20something%20different%20from%20letters%20and%20numbers%2C%20aka%20you%20can%20match%20Cities%20from%20Cities%20and%20you%20get%20the%20distance%20between%20them%2C%20with%200%20on%20the%20diagonal.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETell%20us%20some%20more%20details%20about%20that%20%22multiple%20drop%20downs%22%3A%20how%20many%3F%20And%20how%20is%20structured%20the%20sheet%20with%20the%20raw%20datas%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Mark Wiper
Occasional Contributor

Hi Apologies if this query is already answered but I cant for the life of me find it!

 

I want to interrogate the table for a specific search string generated from multiple drop downs and display the correct result In cell "N2".

 

Is "INDEX MATCH" the best way to do this. any help much appreciated

 

MW

8 Replies

The "Index Match" function is perfect if you have a double side entry table i.e. columns with options A B C D... and rows with options 1 2 3 4... (as excel itself). In that case, if you insert a letter and a number, "index match" will give you the exact cell you need.

 

This obviously works even with something different from letters and numbers, aka you can match Cities from Cities and you get the distance between them, with 0 on the diagonal.

 

Tell us some more details about that "multiple drop downs": how many? And how is structured the sheet with the raw datas?

Hello,

 

please post a data sample. Mock up the expected result, so we know what we are aiming for. You can upload a workbook to the thread here.

Thanks for replys - I've attached a version of the file which should explain what I mean better.

 

At the moment the table isn't very large but could eventually run into hundreds of rows of data to interrogate, hence the need for an intelligent lookup.

 

Much appreciated

 

Solution

Hello,

 

that sample file is really helpful.  I can suggest two approaches:

 

Approach 1: use a helper column where you combine all the lookup criteria into a lookup key. Insert a new column after F and in the new column G enter this formula in row 2 and copy down:

 

=A2&B2&C2&E2

 

It combines all the values to one lookup key. Now you can refer to that lookup key in an Index/Match combination formula in cell M2:

 

=INDEX($F$2:$F$13,MATCH(I2&J2&K2&L2,$G$2:$G$13,0))

 

Or, if you don't want to use the helper column, you can do it all in one step, but the result may take a while to calculate if you have many rows of data. I'm still taking into account that a column G was added, so the cell references are a bit different from your original layout, but you can see it working in the attached file. In cell M3 I use the formula 

 

=INDEX($F$2:$F$13,MATCH(I3&J3&K3&L3,INDEX($A$2:$A$13&$B$2:$B$13&$C$2:$C$13&E2:E13,0),0))

 

File is attached. Let me know if that helped.

Your an absolute star!!!!! Works perfectly......

 

Thanks and much appreciated

 

Mark

Hi - was hoping you could help me again...

 

I have taken your previous advice and incorporated it into attached spreadsheet. 

 

I've then simplified the lookup generator by creating variable drop down lists and removing duplicates with name range formula.

 

I want to take the drop down data validation to next level by enforcing only possible selections that exist in the table. Hope Im making sense

 

Thanks again

Mark

Hi - was hoping you could help me again...

 

I have taken your previous advice and incorporated it into attached spreadsheet. 

 

I've then simplified the lookup generator by creating variable drop down lists and removing duplicates with name range formula.

 

I want to take the drop down data validation to next level by enforcing only possible selections that exist in the table. Hope Im making sense

 

Thanks again

Mark

 
 

Hi!

two variable v-lookup created this video, may pls see if it helps.

Link: https://youtu.be/gSwvCEviqLQ

Thanks,

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies