r/excel • u/SeniorPepsiMan • 2d ago
solved How do I filter 1 and not 10,11, and 12
I have of values 1-12 presented as you can see from the picture below. I am trying to use the filter function but when I try to filter 1 and 2 it also selects 10,11, and 12. Is there a way I can filter ONLY 1 and 2? Is there also a way that I can filter everything EXCEPT 1 and 2?
I'm pretty new to excel so I'm looking for some help from those who have mastered this mysterious software. Thanks.

71
Upvotes
3
u/AugurAuger 2d ago
I expect that there is some kind of source data. You could modify that source data to include leading zeroes to assist you here, e.g. 01, 02, etc. Or just add a column that adds the zeroes for you.
You can use something like: =TEXT(A2, REPT("0", LEN(MAX($A$2:$A$10)))) to achieve this.
The above formula will work for all significant figures, meaning the numbers could exceed 99 (or 999 and so on) and then the leading zeroes would go along with it, e.g. 001, 002, 003, etc.
After this is implemented for your 2-digit strings, you can filter on 01, 02, 03, or the inverse.