Nesting If Statements-----ARRRGGGH!!

Dargie

New Member
Joined
Oct 30, 2003
Messages
22
Nesting IF Statements

hello Folks

Can anyone help me out with this one :oops:

Heres a wee example of the kind of thing i need to do
Age is in column B3 Formula is in column B4

=IF(B3>=18,"Adult","")
=IF(B3<18, "Child","")

How can these be nested together into one statement.
All help appreciated

Cheers Steve
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Better check that one GorD.....I don't think that one works. I know because I tried it......lol.
 
Upvote 0
=IF(B3>=18,"Adult","")
=IF(B3<18, "Child","")
hi again

is there any way that the second argument could contain an Or statement

im not relly too sure about these ones at all

=IF(B3<18 or >0,"child","")

Thanks
 
Upvote 0
No need for an OR for waht you asked for....the one I give you does just that.
If your worried about others entering a number less than or equal to 0, then Validate B3 as Whole Number greater then Zero.
 
Upvote 0
If B3 is left blank, then the text does not show, i can see this in the formula, so thats working fine.
=If(B3="","",

But if i enter any number in b3 from 1 upwards it comes back adult for all values

I have pasted in the formula from the formula bar


=IF(B3="","",IF(B3>=18,"adult","child"))

Dont understand, as the way im reading your formula, it should work fine.
I can understand the basic If statements, it's joining them thats got me lost
 
Upvote 0

Forum statistics

Threads
1,203,488
Messages
6,055,716
Members
444,811
Latest member
NotJack

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