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

my8950

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

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
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:
Upvote 0

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!
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,173
Members
453,021
Latest member
Justyna P

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
Back
Top