vlook up on multiple drop down lists

%3CLINGO-SUB%20id%3D%22lingo-sub-1561111%22%20slang%3D%22en-US%22%3Evlook%20up%20on%20multiple%20drop%20down%20lists%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1561111%22%20slang%3D%22en-US%22%3E%3CP%3E-Please%20see%20the%20table%201%20below%20to%20calculate%20cost%20in%20the%20Table%202%20according%20to%20variable%20values%20in%20the%20cells%20(%20K4%2CL4%2CM4%20)%20%2Cusing%20vlookup%20formula%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1561111%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1561131%22%20slang%3D%22en-US%22%3ERe%3A%20vlook%20up%20on%20multiple%20drop%20down%20lists%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1561131%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F747134%22%20target%3D%22_blank%22%3E%40Ahmad920%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20say%20you%20prefer%20a%20VLOOKUP%20formula%2C%20but%20don't%20provide%20a%20reason.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMay%20I%20recommend%20instead%20(if%20you%20have%20the%20most%20recent%20release%20of%20Excel)%20the%20FILTER%20function.%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3DFILTER(G7%3AG19%2C(C7%3AC19%3DK8)*(D7%3AD19%3DL8)*(E7%3AE19%3DM8)%2C%22No%20match%22)%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1561157%22%20slang%3D%22en-US%22%3ERe%3A%20vlook%20up%20on%20multiple%20drop%20down%20lists%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1561157%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F747134%22%20target%3D%22_blank%22%3E%40Ahmad920%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20don't%20happen%20to%20have%20the%20most%20recent%20Excel%20release%2C%20if%20(in%20other%20words)%20that%20FILTER%20solution%20doesn't%20work%2C%20here's%20a%20solution%20that%20takes%20advantage%20of%20one%20of%20my%20favorite%20old-school%20functions%20that%20very%20few%20people%20know%20about...the%20various%20Database%20functions%20that%20begin%20with%20D_____.%20In%20this%20case%20DGET.%20It%20allows%20you%20to%20specify%20multiple%20criteria%20for%20retrieving%20a%20value%20from%20a%20talbe%2C%20exactly%20what%20you're%20trying%20to%20do.%20All%20you%20need%20to%20do%20to%20get%20it%20to%20work%2C%20is%20change%20the%20headings%20above%20the%20dropdowns%20where%20you%20specify%20the%20criteria%20so%20they%20match%20the%20column%20headings%20in%20Table1.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22mathetes_0-1596370922641.png%22%20style%3D%22width%3A%20738px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F209710i63C4660A324108DA%2Fimage-dimensions%2F738x165%3Fv%3D1.0%22%20width%3D%22738%22%20height%3D%22165%22%20title%3D%22mathetes_0-1596370922641.png%22%20alt%3D%22mathetes_0-1596370922641.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EThe%20formula%20is%20visible%20up%20there%20at%20the%20top%20of%20that%20image.%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3DIFERROR(DGET(B6%3AG19%2C%22Cost%22%2CK7%3AM8)%2C%22No%20Match%22)%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20attached%20the%20revised%20file%20so%20you%20can%20experiment%20with%20other%20values%20to%20see%20how%20it%20works.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1561160%22%20slang%3D%22en-US%22%3ERe%3A%20vlook%20up%20on%20multiple%20drop%20down%20lists%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1561160%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F425987%22%20target%3D%22_blank%22%3E%40mathetes%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20use%20Excel%202016%26nbsp%3B%20and%20I%20do%20not%20have%20FILTER%20function%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1561176%22%20slang%3D%22en-US%22%3ERe%3A%20vlook%20up%20on%20multiple%20drop%20down%20lists%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1561176%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F425987%22%20target%3D%22_blank%22%3E%40mathetes%3C%2FA%3E%26nbsp%3B%20so%20much%3C%2FP%3E%3CP%3Ethat%20is%20really%20great%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1561192%22%20slang%3D%22en-US%22%3ERe%3A%20vlook%20up%20on%20multiple%20drop%20down%20lists%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1561192%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F747134%22%20target%3D%22_blank%22%3E%40Ahmad920%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThose%20D____%20functions%20are%20very%20nice%20and%20useful.%20They've%20been%20around%20in%20Excel%20for%20decades%2C%20yet%20very%20few%20users%20are%20aware%20of%20them.%20And%20they're%20probably%20functionally%20superseded%20now%20by%20such%20functions%20as%20FILTER%20(which%2C%20yes%2C%20is%20newer%20than%20your%20version%2C%20but%20a%20good%20reason%20to%20update%20your%20software).%20FILTER%20can%20be%20used%20in%20conjunction%20with%20other%20functions%20to%20do%20lots%20of%20things%2C%20but%20so%20long%20as%20you%20don't%20have%20it%2C%20it's%20worthwhile%20to%20be%20aware%20of%20these%20long-available%20tools%20for%20data%20retrieval%20(database%20functions)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3COL%3E%3CLI%3EDGET%2C%20which%20will%20retrieve%20a%20value%3C%2FLI%3E%3CLI%3EDSUM%2C%20which%20will%20retrieve%20the%20sum%20of%20multiple%20rows%20that%20meet%20a%20given%20set%20of%20criteria%3C%2FLI%3E%3CLI%3EDAVERGE%3C%2FLI%3E%3CLI%3Ewell%2C%20let%20me%20just%20refer%20you%20to%20this%20list%3A%20%3CA%20href%3D%22https%3A%2F%2Fwww.excelfunctions.net%2Fexcel-database-functions.html%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.excelfunctions.net%2Fexcel-database-functions.html%3C%2FA%3E%3C%2FLI%3E%3C%2FOL%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1561354%22%20slang%3D%22en-US%22%3ERe%3A%20vlook%20up%20on%20multiple%20drop%20down%20lists%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1561354%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F747134%22%20target%3D%22_blank%22%3E%40Ahmad920%3C%2FA%3E%26nbsp%3B%2C%20here's%20a%20variation%20using%20SUMIFS%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DSUMIFS(%24G%247%3A%24G%2419%2C%24C%247%3A%24C%2419%2CK8%2C%24D%247%3A%24D%2419%2CL8%2C%24E%247%3A%24E%2419%2CM8)%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1561614%22%20slang%3D%22en-US%22%3ERe%3A%20vlook%20up%20on%20multiple%20drop%20down%20lists%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1561614%22%20slang%3D%22en-US%22%3Ewell%20noted%20%2C%20Thanks%3C%2FLINGO-BODY%3E
Occasional Contributor

SOLVED

-Please see the table 1 below to calculate cost in the Table 2 according to variable values in the cells ( K4,L4,M4 ) ,using vlookup formula

 

thanks!

7 Replies

@Ahmad920 

 

You say you prefer a VLOOKUP formula, but don't provide a reason.

 

May I recommend instead (if you have the most recent release of Excel) the FILTER function.

=FILTER(G7:G19,(C7:C19=K8)*(D7:D19=L8)*(E7:E19=M8),"No match")

 

 

 

@Ahmad920 

 

If you don't happen to have the most recent Excel release, if (in other words) that FILTER solution doesn't work, here's a solution that takes advantage of one of my favorite old-school functions that very few people know about...the various Database functions that begin with D_____. In this case DGET. It allows you to specify multiple criteria for retrieving a value from a talbe, exactly what you're trying to do. All you need to do to get it to work, is change the headings above the dropdowns where you specify the criteria so they match the column headings in Table1.

mathetes_0-1596370922641.png

The formula is visible up there at the top of that image.

=IFERROR(DGET(B6:G19,"Cost",K7:M8),"No Match")

 

I've attached the revised file so you can experiment with other values to see how it works.

 

Thanks @mathetes 

 

I use Excel 2016  and I do not have FILTER function

 

Thank you @mathetes  so much

that is really great 

 

@Ahmad920 

 

Those D____ functions are very nice and useful. They've been around in Excel for decades, yet very few users are aware of them. And they're probably functionally superseded now by such functions as FILTER (which, yes, is newer than your version, but a good reason to update your software). FILTER can be used in conjunction with other functions to do lots of things, but so long as you don't have it, it's worthwhile to be aware of these long-available tools for data retrieval (database functions)

 

  1. DGET, which will retrieve a value
  2. DSUM, which will retrieve the sum of multiple rows that meet a given set of criteria
  3. DAVERGE
  4. well, let me just refer you to this list: https://www.excelfunctions.net/excel-database-functions.html

 

@Ahmad920 , here's a variation using SUMIFS:

 

=SUMIFS($G$7:$G$19,$C$7:$C$19,K8,$D$7:$D$19,L8,$E$7:$E$19,M8)
well noted , Thanks