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

#### my8950

##### Board Regular
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

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

#### cunningAce

##### Board Regular
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.

Last edited:

#### my8950

##### Board Regular

Or you could try somethin like this also where you can add the options inside the curly braces.

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!

You're welcome.

#### Indystick

##### Board Regular
If you have the latest version of Excel, you might also consider using the SWITCH function.

#### my8950

##### Board Regular
If you have the latest version of Excel, you might also consider using the SWITCH function.

Oh, that looks like it would be even easier...Although we are still using Standard 2010 version.

Replies
2
Views
405
Replies
0
Views
106
Replies
2
Views
472
Replies
0
Views
1K
Replies
1
Views
596

1,186,875
Messages
5,960,370
Members
438,472
Latest member
Nate J

### 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.

### Which adblocker are you using?

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

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