PDA

View Full Version : Using Autofilter Custom feature...



psionic
11-10-2007, 04:35 AM
Hi again :hi: Experts (so I hear others say).

I have come across a situation while using the Excel Autofilter Custom in Excel 2002 where you select these range of options to choose from.

When I use the "contains" selection and specify 1
I will get a list of entries that contains anything with a "1" in it. That is no problem.

Is it possible to do this with a range of numbers like 0-9 ?

In other words instead of repeating these steps for each number can we do this similar to the VBA like [0-9] thing?

It does really matter if we can't do this but I am curious would it work?

Thanks and warm regards,
Psionic

Bob Phillips
11-10-2007, 05:02 AM
You could easily add a helper column that checked for such and filter by that column. Not direct, but easy.

unmarkedhelicopter
11-10-2007, 07:40 AM
I'm thinking of an answer, can you tell what it is ?

Bob Phillips
11-10-2007, 08:01 AM
Perhaps others will tell him.

Zack Barresse
11-10-2007, 11:14 AM
Unfortunately, as Bob mentioned, you only have two criteria to use per column with AutoFilter. If you had an additional column you could use (assuming your data was in col A), in B2 you could enter the following to find any number within a value...

=IF(COUNT(VALUE(MID(A2,ROW($A$1:OFFSET($A$1,LEN(A2)-1,0)),1)))>0,1,0)

Edit: This is an array formula, must be confirmed with Ctrl + Shift + Enter instead of just Enter.

Add a header to B1 and filter for a 1 value.

HTH

Bob Phillips
11-10-2007, 03:09 PM
You can do it without an array formula



=ISNUMBER(--MID(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"0123456789")),1))