Help with nesting

cdsaroma

Board Regular
Joined
Feb 5, 2003
Messages
200
Is there anyway to nest this into one formula?

these are the (3) formulas:

=IF(A2<1994,"No PW","")
=IF(A2>=1994,"Card","")
=IF(AF="lux","Cert","")

thanks
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
In your third condition, is that supposed to "A2" also, and not "AF"?
If so, then just nest your if statements,:
Code:
=IF(A2<1994,"No PW",IF(A2>=1994,"Card",IF(A2="lux","Cert","")))
 
Upvote 0
The first two can be combined as

=IF(A2<1994,"No PW","Card")

But check your 3rd statement...looks like a typo. should "AF" be something else?
 
Upvote 0
What is "AF"?
Are you trying to see if "lux" exists anywhere in column AF on your sheet (instead of in a particular cell like "AF2")?
 
Upvote 0
Stupid me...it was meant to be AF2, I have it working now.
Note the hierarchy of nested IF statements. It stops once it finds the first True statement. So how you order them is imporant.

For example, what do you want to return if A2 < 1994 AND AF2 ="lux"?
Do you want to return "No PW" or "Cert"?
Whichever one "wins" in that instance is the condition you want to place first in your nested IF statement.
 
Upvote 0
Note the hierarchy of nested IF statements. It stops once it finds the first True statement. So how you order them is imporant.

For example, what do you want to return if A2 < 1994 AND AF2 ="lux"?
Do you want to return "No PW" or "Cert"?
Whichever one "wins" in that instance is the condition you want to place first in your nested IF statement.

I didn't know that, thanks.
 
Upvote 0

Forum statistics

Threads
1,224,506
Messages
6,179,159
Members
452,892
Latest member
yadavagiri

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