ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   2 variable Lookup (https://www.excelbanter.com/excel-discussion-misc-queries/231000-2-variable-lookup.html)

andrewevandc

2 variable Lookup
 
I know how to use vlookup but on only 1 variable.

I have a table with two variables, part # and count, and I want to be able to
look up a 3rd variable with a formula.

Thus:

PART COUNT COST
3SA3 50 $2.23
3SA3 100 $3.99
3SA3 200 $7.89
5GX1 10 $1.80
5GX1 20 $2.99

etc. So the goal would be that if on another sheet I had the part in cell A1
and the count in Cell A2, I could use a formula in cell A3 to return the
correct cost.

Thanks,
Andrew


T. Valko

2 variable Lookup
 
Try this:

=SUMPRODUCT(--(Sheet2!A2:A10=A1),--(Sheet2!B2:B10=A2),Sheet2!C2:C10)

--
Biff
Microsoft Excel MVP


"andrewevandc" <u51945@uwe wrote in message news:9621c354daf15@uwe...
I know how to use vlookup but on only 1 variable.

I have a table with two variables, part # and count, and I want to be able
to
look up a 3rd variable with a formula.

Thus:

PART COUNT COST
3SA3 50 $2.23
3SA3 100 $3.99
3SA3 200 $7.89
5GX1 10 $1.80
5GX1 20 $2.99

etc. So the goal would be that if on another sheet I had the part in cell
A1
and the count in Cell A2, I could use a formula in cell A3 to return the
correct cost.

Thanks,
Andrew





All times are GMT +1. The time now is 09:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com