Vlook up with multiple conditions

SimonaB

New Member
Joined
May 24, 2016
Messages
7
Hello,

I am in some trouble when trying to use vlook up with multiple conditions. I have read a few threads but I can't seem to make it work for my task.

Can you explain me on this example?
We have two products in two different storage locations each. I want to see sales matched with the stock here given that in my excel they are in different tables.

ProductWarehouseStockProductSalesWarehouse
123A10012370A
123B150123425A
1234A501234150B
1234B200

<tbody>
</tbody>

I would kindly appreciate your help, it would be a life-saver!!

Thanks in advance!

Simona
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
This?


Excel 2010
ABCDEFGH
1ProductWarehouseStockProductSalesWarehouse
2123A10012370A100
3123B150123425A50
41234A501234150B200
51234B200
Sheet10
Cell Formulas
RangeFormula
H2{=INDEX($C$2:$C$5,MATCH(E2&G2,$A$2:$A$5&$B$2:$B$5,0))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Whether single or multiple criteria, the Index(Match) can be an important alternative to VLOOKUP.
In many cases I prefer INDEX(MATCH) because of the large arrays I regularly deal with or the fact that I want to pull from the left of the matched value.

(Now I should plug Mike Girvin's book.)
 
Upvote 0
Hello,

Thanks for the reply. However, the formula does not work properly because it does not always return the correct sales value... :(

Any idea what I might be doing wrong?

This?

Excel 2010
ABCDEFGH
1ProductWarehouseStockProductSalesWarehouse
2123A10012370A100
3123B150123425A50
41234A501234150B200
51234B200

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet10

Array Formulas
CellFormula
H2{=INDEX($C$2:$C$5,MATCH(E2&G2,$A$2:$A$5&$B$2:$B$5,0))}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>
 
Upvote 0
Glad you got it to work but as you see the formula above returned all three matches, or did you want something different?
 
Upvote 0

Forum statistics

Threads
1,215,772
Messages
6,126,814
Members
449,340
Latest member
hpm23

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