How to filter out certain state

 Sam -

I want to be able to filter out certain states in column B. Column A contain all the states and I want the state: CA, NV, TX, MO, MS, and MI to display a certain word in column B for these states only. How do I get column B to display the word " Vacation" for the states listed above in excel?

Problem A: What is the formula for the above in excel?
Problem B: What is the formula for the above in excel macro if I choose to go this direction?


2 replies

Registration date
Sunday June 14, 2009
Last seen
August 7, 2021
In the first cell in B column (where column is state name) type this formula


copy this down till the data is available

remember in certain version you cannot have more than 7 possiilities under OR.

in the case of macro study "select case"
It works!. Thank you so much!!!