Filtering numerical strings

Drofidnas

Board Regular
Joined
Jun 30, 2004
Messages
126
This should be simple and maybe I'm being daft but I can't fix it.

I've got a list of 200 documents (and growing) and each applies to one or several boxes (1-19) of a process flow diagram
(ie, in box 6 of the diagram you need Doc A, B, C, F, K, in boxes 1, 2, 3, 7, 10, 15 you need Doc D, G, F etc.

The creators of the spreadsheet have put the diagram boxes in one cell separated by commas (thanks guys).

I've written a macro to filter on each box number to see which Docs are applicable and then extract them to a separate sheet, but when I filter on "contains 1" I get 10, 11, 12 up to 19 as well (obviously). When I filter on "contains 2", I get 12. etc. I can't use "equals 1" because the numbers are written as a string and the cell is greater than just a figure.

I'm considering renumbering 1-19 as A to S to get some uniqueness to the diagram boxes or introduce text into them but surely there must be a way to filter on unique numbers in a string?

Any help out there?

Many thanks.

Chris
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
If the numbers are separated by a comma space, you could use a helper column with a formula like
Excel Formula:
=ISNUMBER(FIND(" 1,"," "&A2&","))
and then filter that column for true
 
Upvote 0

Forum statistics

Threads
1,214,923
Messages
6,122,289
Members
449,077
Latest member
Rkmenon

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