Lookup multiple criteria problem

Stacy Rueda

Board Regular
Joined
Jun 23, 2016
Messages
87
Hi guys,

i need help on what formula should I use on below data. I have two files that consists of hundred of rows, wherein I want to lookup the price from file 1 to file 2 that will meet the same destination.

Example: For Part number AQ-123 (it has many destinations from file 1), but in file 2 i want to lookup the price only the required destination. Hope someone can help me, or if there is the same thread, kindly reply with the link. Appreciate your response. Thank you in advance.

File 1
Part No.DestinationPrice
AQ-123CN $ 13.00
AQ-909HK $ 76.00
AQ-987US $ 23.00
AQ-671US $ 34.00
AQ-234CN $ 131.00
AQ-298HK $ 421.00
AQ-123US $ 872.00
AQ-123HK $ 909.00
AQ-123 JP $ 16.00
File 2
Part No.DestinationPrice
AQ-298HK
AQ-234CN
AQ-123CN
AQ-123US
AQ-909HK
AQ-987US
AQ-671US

<colgroup><col><col><col></colgroup><tbody>
</tbody>
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Hi,

This is one way, change/adjust cell references/range, add sheet name, as needed:


Book1
ABC
1File 1
2
3Part No.DestinationPrice
4AQ-123CN$13.00
5AQ-909HK$76.00
6AQ-987US$23.00
7AQ-671US$34.00
8AQ-234CN$131.00
9AQ-298HK$421.00
10AQ-123US$872.00
11AQ-123HK$909.00
12AQ-123JP$16.00
13
14File 2
15
16Part No.DestinationPrice
17AQ-298HK$421.00
18AQ-234CN$131.00
19AQ-123CN$13.00
20AQ-123US$872.00
21AQ-909HK$76.00
22AQ-987US$23.00
23AQ-671US$34.00
Sheet583
Cell Formulas
RangeFormula
C17=SUMIFS(C$4:C$12,A$4:A$12,A17,B$4:B$12,B17)


Formula copied down.
 
Upvote 0
Hi @jtakw, Thank you very much for your reply. I tried your formula using the data above and it works, but during the actual file, the result is 0 in all rows. Is there an effect because I have different worksheet?
 
Upvote 0
Yes, as I mentioned above,

change/adjust cell references/range, add sheet name, as needed

You need to add the sheet name to the formula where it references where your lookup table resides, sample:

=SUMIFS(SheetName!C$4:C$12,SheetName!A$4:A$12,A17,SheetName!B$4:B$12,B17)
 
Upvote 0
Hi again @jtakw, I'm sorry but how it was happened that the formula above doesn't sum the price of PN? I'm sorry I thought it was ok already because what happened to my file is all price for AQ-123 sums up all the destination. Thank you in advance for the reply
 
Upvote 0
Hi @jtakw, My file should not need to sum up the price, just looking at the price per destination. Is it possible If can use Index - Match
 
Upvote 0
I'm not understanding your problem, can you explain what the issue is?
Are None of the Part No. Not summing?, Or some do, and some don't?

Describe what Is calculating correctly and what is Not.
Also, where does the data come from ( Part No., Destination, Price ), is it imported from another source, manually entered, or?
 
Upvote 0
Hi @jtakw, Sorry, but as per checking in my file, there are AQ-123 that has US repeatedly three times, then it doesn't need to sum all the three destination. I just need to get the price of US destination. Then per destination is fixed price, it doesn't change. Sorry I revised my first table. Please check AQ-123, the result should be $872 and not 2616 (sum). Thank you in advance.


For example

File 1
Part No.DestinationPrice
AQ-123CN$ 13.00
AQ-909HK$ 76.00
AQ-987US$ 23.00
AQ-671US$ 34.00
AQ-234CN$ 131.00
AQ-298HK$ 421.00
AQ-123US$ 872.00
AQ-123HK$ 909.00
AQ-123US

$ 872.00
AQ-123US$872.00



Part No.DestinationPrice
AQ-298HK
AQ-234CN
AQ-123CN
AQ-123US
AQ-909HK
AQ-987US
AQ-671US


<tbody>
</tbody>
 
Upvote 0
Hi @jtakw, My file should not need to sum up the price, just looking at the price per destination. Is it possible If can use Index - Match

Looks like we posted at the same time.

Ok, so it seems you may have "duplicate" matching Part No. and Destinations, and you just want to lookup the Price, is that correct?

If so, would the duplicates be the same?, cause if we do an INDEX/MATCH, it'll return the First found only, or if they may be different, then what should happen?
 
Upvote 0

Forum statistics

Threads
1,214,909
Messages
6,122,189
Members
449,072
Latest member
DW Draft

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top