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

my8950

Board Regular
Joined
May 1, 2009
Messages
158
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!
 

Some videos you may like

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

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
158

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!
 

cunningAce

Board Regular
Joined
Dec 21, 2017
Messages
86

ADVERTISEMENT

You're welcome.
 

Watch MrExcel Video

Forum statistics

Threads
1,127,623
Messages
5,625,935
Members
416,143
Latest member
JoyceMB

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