Filter value applying to numbers separated by comma

Niall19

New Member
Joined
Dec 13, 2022
Messages
8
Office Version
  1. 365
Platform
  1. Windows
Hi all,

Apologies for the simple question regarding filter values. I would like, if trying to isolate batch 1, for example, for the results to include the entry which has both "1,9" as this entry appears in both batch 1 & 9. Currently, this is viewed as a separate category so would not appear under batch 1 filtering. This would streamline our process.

1708513289064.png


Help would be greatly appreciated,

Niall
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Assuming you don't want to find 11 or 51 - I have something here with a helper column. I can't figure out how to do it without the helper column. But I suspect someone can figure that if you need it.

MrExcelPlayground21.xlsx
AB
1ThingSolution
21TRUE
33FALSE
45,1TRUE
51,9TRUE
611FALSE
711,12FALSE
81,12TRUE
93FALSE
104,5FALSE
Sheet1
Cell Formulas
RangeFormula
B2:B10B2=OR(VALUE(TEXTSPLIT(A2,","))=1)
 
Upvote 0
Solution
Assuming you don't want to find 11 or 51 - I have something here with a helper column. I can't figure out how to do it without the helper column. But I suspect someone can figure that if you need it.

MrExcelPlayground21.xlsx
AB
1ThingSolution
21TRUE
33FALSE
45,1TRUE
51,9TRUE
611FALSE
711,12FALSE
81,12TRUE
93FALSE
104,5FALSE
Sheet1
Cell Formulas
RangeFormula
B2:B10B2=OR(VALUE(TEXTSPLIT(A2,","))=1)
Hi,

Thank you for the suggestion. This spreadsheet already has a sea of columns so my instinct is to avoid any extra columns being added if at all possible.

Is a formula possible, for example, if an entry is "1, 9", to include all entries with the value "1" somewhere in the cell, even if with a comma and another value, to include in the filter results for just "1". Word salad but hope that makes sense.

My excel knowledge is very poor so at least if I know this is not possible without an extra column, it's something.

Niall
 
Upvote 0
I don't know of a way to do that if you want to exclude say "11" from being counted as a "1". If the data set is only 1 to 9 and you don't worry about a false positive on 11, then something like this will work:
MrExcelPlayground21.xlsx
A
1Thing
21
33
45,1
51,9
611
711,12
81,12
93
104,5
11
12
13
141
155,1
161,9
1711
1811,12
191,12
Sheet1
Cell Formulas
RangeFormula
A14:A19A14=FILTER(A2:A10,NOT(ISERROR(SEARCH(1,A2:A10))))
Dynamic array formulas.
 
Upvote 0
This will exclude things like 11 and 512 from finding 1's. Assuming there are no spaces around the commas.

MrExcelPlayground21.xlsx
AB
211
335,1
45,11,9
51,91,12
611
711,12
81,12
93
104,5
Sheet1
Cell Formulas
RangeFormula
B2:B5B2=FILTER(A2:A10,ISNUMBER(SEARCH(","&1&",",","&A2:A10&",")))
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,215,216
Messages
6,123,669
Members
449,114
Latest member
aides

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