Vlookup Formula needed

Johnboy28

Board Regular
Joined
Jun 22, 2013
Messages
182
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2013
  5. 2010
Platform
  1. Windows
Hi,

Any help will be great - looking for a Vlookup that can match "Warehouse Locations" to location, and then match Code and return Count?

Example - Code 74208 should equal 6

LocationCodeCountWarehouse LocationsCodeCount
CSB1118CSB174209??
CSC1287CSC174208??
CSB1410
CSB1517
CSB1613
CSC1742086
CSB11610
CSB1196
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
try this

Book1
ABCDEFGH
2LocationCodeCountWarehouse LocationsCodeCount
3CSB1118CSB1517
4CSC1287CSC1742086
5CSB1410
6CSB1517
7CSB1613
8CSC1742086
9CSB11610
10CSB1196
Sheet2
Cell Formulas
RangeFormula
H3:H4H3=SUMPRODUCT(--($A$3:$A$10=E3),--($B$3:$B$10=G3),$C$3:$C$10)
 
Upvote 0
Is this what you are after?

24 01 23.xlsm
ABCDEFGH
1LocationCodeCountWarehouse LocationsCodeCount
2CSB1118CSB174209Not Found
3CSC1287CSC1742086
4CSB1410
5CSB1517
6CSB1613
7CSC1742086
8CSB11610
9CSB1196
Lookup
Cell Formulas
RangeFormula
H2:H3H2=XLOOKUP(E2:E3&"|"&G2:G3,A2:A9&"|"&B2:B9,C2:C9,"Not Found")
Dynamic array formulas.
 
Upvote 0
try this

Book1
ABCDEFGH
2LocationCodeCountWarehouse LocationsCodeCount
3CSB1118CSB1517
4CSC1287CSC1742086
5CSB1410
6CSB1517
7CSB1613
8CSC1742086
9CSB11610
10CSB1196
Sheet2
Cell Formulas
RangeFormula
H3:H4H3=SUMPRODUCT(--($A$3:$A$10=E3),--($B$3:$B$10=G3),$C$3:$C$10)
Thank you for the reply. The sumproduct works good but I need the "all location" to be combined in the formula not calculated by single cell?

LocationCodeCountAll LocationsCodeCount
CSB1118CSC1742090
CSB1287CSC4742086
CSB1410
CSB1517
CSB1613
CSC4742086
CSB11610
CSB1196
 
Upvote 0
Thank you for the reply. The sumproduct works good but I need the "all location" to be combined in the formula not calculated by single cell?

LocationCodeCountAll LocationsCodeCount
CSB1118CSC1742090
CSB1287CSC4742086
CSB1410
CSB1517
CSB1613
CSC4742086
CSB11610
CSB1196


Table 1
LocationCodeCount
CSB1118
CSB1287
CSB17420810
CSB1517
CSB1613
CSC4742086
CSB11610
CSB1196

Table 2
All Locations
CSC1
CSC4


Table 3
CodeCount
742090
742086

Ultimately we need to get the sum count for the codes in table 3. Lookup the code from Table 3 in Table 1 but only include Locations in table 1 that match table 2. So using the example above, we should only have a count of 6 for code 74208.

I tried #5 formula? did work on my sheet.
 
Upvote 0
I tried #5 formula? did work on my sheet.
From what I am understanding of tour added description/samples I think you may have meant "did not work on my sheet"?

See if this does what you want then.
If not, as well as giving any further explanation, please give a slightly larger sample including examples (if it is possible with your data) where a Code in column F in my layout exists more than once in column B but with more than one Location in column A.

24 01 23.xlsm
ABCDEFG
1LocationCodeCountWarehouse LocationsCodeCount
2CSB1118CSB1742090
3CSC1287CSC1742086
4CSB1410
5CSB1517
6CSB1613
7CSC1742086
8CSB11610
9CSB1196
Lookup (2)
Cell Formulas
RangeFormula
G2:G3G2=BYROW(F2:F3,LAMBDA(r,SUM(FILTER(C2:C9,ISNUMBER(MATCH(A2:A9,E2:E3,0))*ISNUMBER(MATCH(B2:B9,r,0)),0))))
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,216,783
Messages
6,132,690
Members
449,748
Latest member
freestuffman

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