Filtering based on list of numbers

HorseMcHorse

New Member
Joined
May 8, 2023
Messages
1
Office Version
  1. 2016
Platform
  1. Windows
I am trying to create a function to filter a table based on whether a column contains a certain number. This column contains numbers separated by /. Like so:

1683595104841.png


Using Excel 2016, I am attempting to create a function to filter it based on a different cell containing that number. I.e., the following would be produced:

1683594873167.png


Or,

1683594910848.png

I attempted at first to simply find the value, however, am unsure how to deal with the / separators, and with recognizing "2" as distinct from, say, "12" or "20", without simply encoding all single digit values differently. I would appreciate any pointers, with a mind that this is using Excel 2016.
 

Attachments

  • 1683594789845.png
    1683594789845.png
    6.8 KB · Views: 6

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Welcome to the MrExcel board!

See if this helps.
(It may be that in your version you may need to confirm the formula with Ctrl+Shift+Enter, not just Enter before copying down/across.)

23 05 09.xlsm
ABCDEFGHI
1Filter on:246
2A2A2C46/2/30
3B2/20B2/20D46/23
4C46/2/30C46/2/30  
5D46/23    
6
Filter
Cell Formulas
RangeFormula
E2:F5E2=IFERROR(INDEX(A:A,AGGREGATE(15,6,ROW($B$2:$B$5)/ISNUMBER(FIND("/"&$E$1&"/","/"&$B$2:$B$5&"/")),ROWS(E$2:E2))),"")
H2:I5H2=IFERROR(INDEX(A:A,AGGREGATE(15,6,ROW($B$2:$B$5)/ISNUMBER(FIND("/"&$H$1&"/","/"&$B$2:$B$5&"/")),ROWS(H$2:H2))),"")
 
Upvote 0

Forum statistics

Threads
1,215,176
Messages
6,123,464
Members
449,100
Latest member
sktz

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