How to do a little more than the basic =IF logical true/false statement....???

my8950

Board Regular
Joined
May 1, 2009
Messages
152
Hello,
I am trying to find a way to build on the basic IF function. IF(logical_test, [value_if_true], [value_if_false])
I want to have a few options rather than just one, such as:
if A1 = 1, B2 would autofill with Good
if A1 = 2, B2 would autofill with Maybe
if A1 = 3, B2 would autofill with Bad
if A4 = 4, B2 would autofill with No Way

This is an example of what I’d like to do, but I’m not even sure what the function would be. I’d want to be able to build this in the cell and not a VBA, that is also critical.
Can anyone give an idea, or point me to an example, or what is this function even called?

Thank you!
 

cunningAce

Board Regular
Joined
Dec 21, 2017
Messages
86
You could nest several If's, This would become along formula if you have more options though,
=IF(A1=1,"Good",IF(A1=2,"Maybe",IF(A1=3,"Bad",IF(A1=4,"No Way","What to do if not 1,2,3 or 4"))))

Or you could try somethin like this also where you can add the options inside the curly braces.
=LOOKUP($A$1,{1,2,3,4},{"Good","Maybe","Bad","No Way"})<strike></strike>
 
Last edited:

my8950

Board Regular
Joined
May 1, 2009
Messages
152

Or you could try somethin like this also where you can add the options inside the curly braces.
=LOOKUP($A$1,{1,2,3,4},{"Good","Maybe","Bad","No Way"})<strike></strike>
This does what I need...I'll try the other suggestions as well so that I can build on my little knowledge of doing these type of things...Thank you!
 

Forum statistics

Threads
1,084,861
Messages
5,380,352
Members
401,666
Latest member
ddekort

Some videos you may like

This Week's Hot Topics

Top