What is the formula to lookup quantity of an item code by different location sorting?

iMailMan

New Member
Joined
Sep 6, 2018
Messages
12
Here is the table of the data for your reference:
LocationItem CodeQty
A1231000
B456700
A7892000
B123500
A4561200
B7893500

<tbody>
</tbody>


Here is the table for data entry:
QtyQty
Item CodeLocation ALocation B
123
456
789

<tbody>
</tbody>


I have try many formula like Vlookup+Hlookup or Index+Match or Vlookup+Match still not successful to get the data entry on the above table mentioned.
Please help and educate me.


Thanks.
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Can i say Sumproduct is a function to sum up the quantity? If yes, this is not i want.
I actually want to fill the quantity of an item code by location.
 
Upvote 0
you are right, but in your case, it will give the quantity of item by location.
 
Upvote 0
Hi iMailMan

Firstly, suggest you don't start another thread - combine any additional information into the original thread.

If your data body range is in range A2:C7, and your results table is in F3, insert the following formula into F3 and copy it across the range F3:G5:

Code:
=SUMPRODUCT(--($A$2:$A$7=RIGHT(F$2,1)),--($B$2:$B$7=$E3),$C$2:$C$7)

Cheers

pvr928
 
Upvote 0
Have a look:

A1231000
B456700
A7892000
B123500
A4561200
B7893500
QtyQty
Item CodeLocation ALocation B
1231000500
4561200700
78920003500

<colgroup><col width="64" span="3" style="width:48pt"> </colgroup><tbody>
</tbody>
The formula I used was
Code:
=SUMPRODUCT(--($A$1:$A$6=RIGHT(B$11,1)),--($B$1:$B$6=$A12),$C$1:$C$6)
 
Upvote 0
Welcome to the MrExcel board!

If the combinations of location & Code in the lookup table are unique (which I expect they are) and you have a reasonably recent version of Excel & have the SUMIFS function then you could also use this.
(I have removed the "Location" text from row 11 to make the formulas simpler though it could be done without this removal if needed.)

Formula in B12 is copied across and down.

Excel Workbook
ABC
1LocationItem CodeQty
2A1231000
3B456700
4A7892000
5B123500
6A4561200
7B7893500
8
9
10QtyQty
11Item CodeAB
121231000500
134561200700
1478920003500
Qty
 
Upvote 0
Thanks for your guide.
I got it and it really works well for my table.

Again, appreciated every above master for your kind assistance.
 
Upvote 0

Forum statistics

Threads
1,214,560
Messages
6,120,222
Members
448,951
Latest member
jennlynn

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