if, not - help needed please excel formula

Copper Contributor

I am sorry if this seems very simple but I am struggling , my hausnab used tio help me but he passed away during pandemic so I am fighting to do this 

I use this to tell me if date is a thusday to block entry  now I want to add block for other days of the week tue, wed, mon - how do I write this 

=IF(K1488="thu","block"," ")

I TRIED =IF(OR(NOT(K1478="Tues"),NOT(K1478="thu"),NOT(K1478="wed")),"do not list ", " ") 

but that gives block on any day... not just tue and thu and then how do I add the other days? 

 

2 Replies

@boogiesioux1 

 

=IF(OR(K1478={"tue","wed","thu"}),"do not list","")

@boogiesioux1 

 

For more flexibility, you might want to create a table like this

mathetes_0-1674417516319.png

 

And then use this formula, here in cell A4, referring to the word in A2,

=VLOOKUP(A2,C2:D8,2,0)

The advantage of an approach like this is that you can change the days that may be listed, or not, by just changing an entry in column D. The formula remains the same.

I've attached a sample spreadsheet (below this message) showing that formula in action. You can test it by changing the entry in the yellow background cell.

mathetes_1-1674417710221.png