If column B has # then pull data from column A beside it

PuntingJawa

Board Regular
Joined
Feb 25, 2021
Messages
157
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
I'm not quite sure how to go about this.

In the table below, I am trying to place the formula to cell M5 that will filter A column based on the information in M3 from data in B column.

With my example, all the cells shown from Column A should be filtered down from M5 since 1 matches the information in M3.

M9 crated items.xlsx
ABCDEFGHIJKLMNOPQRS
1Items cratedCrate #Crate QTYSerial numbers and countsSerial numbers by status
2DCP CountDCB CountERE CountDTM CountDTH CountPPB CountDMM CountDMH CountDCA CountCrate #
3DCP2210R0071Crate 117142544161901234HOLDLOOSERMA
4DCP2210R004112DCPDCBEREDTMDTHPPBDMMDMHDCA12121703235
5DCP2210R0031Crate 2DCP2210R007DCB1910R007ERE1912R048DTM2007R177DTH2007R141PPB1911R001DMM2010R065DMH2010R078 
6DCP2210R006112DCP2210R004DCB2210R006ERE1912R047DTM2007R190DTH2007R180PPB1910R027DMM2010R058DMH2010R080
7DCB1910R0071Crate 3DCP2210R003DCB2210R008DTM2008R042DTH2008R056PPB1910R020DMM2010R012DMH2010R073
8DCP2206R004117DCP2210R006DCB2210R004DTM2007R044DTH2009R159PPB1911R019DMM0210R067DMH2010R029
9DCP2210R0201Crate 4DCP2206R004DCB1910R901DTM2007R018DMM2010R059DMH2010R009
10DCB2210R00610DCP2210R020DCB2206R004DMM2010R060DMH2010R010
7-23-2024
Cell Formulas
RangeFormula
D2:L2D2=D4&" Count"
D3D3=COUNTIF($A$3:$A$1048576,"*DCP*")
E3E3=COUNTIF($A$3:$A$1048576,"*DCB*")
F3F3=COUNTIF($A$3:$A$1048576,"*ERE*")
G3G3=COUNTIF($A$3:$A$1048576,"*DTM*")
H3:I3H3=COUNTIF($A$3:$A$1048576,"*DTH*")
J3J3=COUNTIF($A$3:$A$1048576,"*DMM*")
K3K3=COUNTIF($A$3:$A$1048576,"*DMH*")
L3L3=COUNTIF($A$3:$A$1048576,"*DCA*")
C4,M4C4=COUNTIF($B$3:$B$1048576,1)
N4,C6N4=COUNTIF($B$3:$B$1048576,2)
O4,C8O4=COUNTIF($B$3:$B$1048576,3)
P4,C10P4=COUNTIF($B$3:$B$1048576,4)
Q4Q4=COUNTIF($B$3:$B$1048576,"HOLD")
R4R4=COUNTIF($B$3:$B$1048576,"LOOSE")
S4S4=COUNTIF($B$3:$B$1048576,"RMA")
D5:D21,L5,K5:K23,J5:J20,H5:I8,G5:G9,F5:F6,E5:E18D5=FILTER($A$3:$A$1048576,ISNUMBER(SEARCH(D4,$A$3:$A$1048576)),"")
Dynamic array formulas.
Named Ranges
NameRefers ToCells
'7-23-2024'!_FilterDatabase='7-23-2024'!$A$3:$A$1048576D5:L5, D3:L3
'7-23-2024'!Criteria='7-23-2024'!$B$3:$B$1048576M4:S4, C10, C8, C6, C4
Cells with Conditional Formatting
CellConditionCell FormatStop If True
M5Cell Value=0textNO
A1:D1,T1:XFD4,M3:S4,M1:M2,6:1048576,A2:L5,N5:XFD5Cell Value=0textNO
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Do you mean like this?

ABCDEFGHIJKLMNOPQ
1Items cratedCrate #Crate QTYSerial numbers and countsSerial numbers by status
2Crate #
3DCP2210R00711234
4DCP2210R0043
5DCP2210R0031DCP2210R007DCP2210R006DCP2210R004n/a
6DCP2210R0062DCP2210R003DCP2206R004
7DCB1910R0071DCB1910R007
8DCP2206R0043DCP2210R020
9DCP2210R0201DCB2210R006
10DCB2210R0061
11
Sheet1
Cell Formulas
RangeFormula
M5:M9,O5:O6,N5,P5M5=FILTER($A3:$A10,$B3:$B10=M3,"n/a")
Dynamic array formulas.
 
Upvote 1
Solution
Do you mean like this?

ABCDEFGHIJKLMNOPQ
1Items cratedCrate #Crate QTYSerial numbers and countsSerial numbers by status
2Crate #
3DCP2210R00711234
4DCP2210R0043
5DCP2210R0031DCP2210R007DCP2210R006DCP2210R004n/a
6DCP2210R0062DCP2210R003DCP2206R004
7DCB1910R0071DCB1910R007
8DCP2206R0043DCP2210R020
9DCP2210R0201DCB2210R006
10DCB2210R0061
11
Sheet1
Cell Formulas
RangeFormula
M5:M9,O5:O6,N5,P5M5=FILTER($A3:$A10,$B3:$B10=M3,"n/a")
Dynamic array formulas.
That is a lot more simplistic than the one I made use. For mine, I had to swap column B with A. Thanks a bunch! I am glad I was on the right track.
=DROP(FILTER($A$3:$B$1048575,N3=$A$3:$A$1048575),,1)
 
Upvote 0
Or you could use: =FILTER($B$3:$B$1048575,N3=$A$3:$A$1048575)

(Although I hope you're not actually using a million plus lines)
 
Upvote 0
Or you could use: =FILTER($B$3:$B$1048575,N3=$A$3:$A$1048575)

(Although I hope you're not actually using a million plus lines)
I had another workbook for populating serial numbers to crate tags based on information in a specific cell. It's a monster of a workbook, but what you provided here is going to make my life a lot easier. It doesn't limit me to have information in an odd looking way. I do appreciate your help and that of this board. I've learned a lot here.
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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