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

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
68,094
Office Version
  1. 365
Platform
  1. Windows
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
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,152,115
Messages
5,768,198
Members
425,459
Latest member
Danniey

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
Top