Filtering a list of values

ccampb18

Board Regular
Joined
Jun 2, 2008
Messages
93
This seems really basic but I cannot find an easy way to do this. I have a column that contains values,lets say A-M. I am wanting to filter based on a list of values, like, A, C, D, K, M. I thought I was certain that I have seen something that says "In list" which helped you filter a list of values. Any ideas? Thanks for your help.
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

Colin Legg

MrExcel MVP
Joined
Feb 28, 2008
Messages
3,497
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Sticking with an autofilter, you could add a helper column to your table to act as a TRUE/FALSE indicator which you can filter by. So, for example, if the letters are in column D, the formula in your helper column could be:
Code:
=OR(D2={"A","C","D","E","M"})
 
Upvote 0

ccampb18

Board Regular
Joined
Jun 2, 2008
Messages
93
I could not get that to work. I put that formula in a separate column with the values I am needing and I kept getting an error message.
 
Upvote 0

Colin Legg

MrExcel MVP
Joined
Feb 28, 2008
Messages
3,497
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
It 'works' for me. What exact formula did you try?
 
Upvote 0

ccampb18

Board Regular
Joined
Jun 2, 2008
Messages
93
In cell W2, I put
=or(i2=("0663", "1325", "3100", "3510", "3154", "3511", "3512", "3505")

I tried it with and without the quotations since these aren't necessarily numerical values. I think they are formatted as a text.
 
Upvote 0

Colin Legg

MrExcel MVP
Joined
Feb 28, 2008
Messages
3,497
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Ah okay... you're using the wrong type of brackets.We need to use the curly brackets { } to symbolise an array constant.

Try copying this into your worksheet:
Rich (BB code):
=OR(I2={"0663","1325","3100","3510","3154","3511","3512","3505"})

The numerical equivalent would be:
Rich (BB code):
=OR(I2={663,1325,3100,3510,3154,3511,3512,3505})

Hope that helps... :)
 
Upvote 0

Forum statistics

Threads
1,191,055
Messages
5,984,391
Members
439,883
Latest member
onions44

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