Show: "children" if value in cell is between 0 to 12...

malafaia1

New Member
Joined
Oct 12, 2017
Messages
3
Hello, everyone.

I looked all over the internet and found no solution to this issue. I want my cell to show a text depending on the value the previous one is showing. To be precise:

Show: "children" if value in cell is between 0 to 12..., "adolescent" if value in cell is between 13 to 17 and "adult" if value is 18 or above.

So far, I know that if I do a

=IF(A1 <= 12; "Children")

it works fine, but if I try something like...

=IF(A1 <= 12; "Children", A1 <= 17; "Adolescent"; A1 >= 18; "Adult")

...it won't work. Can you guys help me out on this one? Thank you!
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Try:
Code:
[TABLE="width: 480"]
<colgroup><col width="480"></colgroup><tbody>[TR]
   [TD="width: 480"]=IF(A1<=12,"Children",IF(A1<=17,"Adolescent","Adult"))[/TD]
 [/TR]
</tbody>[/TABLE]


<colgroup><col width="480"></colgroup><tbody>
</tbody>
 
Upvote 0
Welcome to the MrExcel board!

Another option would be
Code:
=LOOKUP(A1,{0,13,18},{"Children","Adolescent","Adult"})
 
Last edited:
Upvote 0
Hello, everyone, and thanks for the warm welcome.

Sadly, none of the functions above worked for me (Formula parse error). Do we have any other options? Thank you!
 
Upvote 0
Could it be that your language setting for Excel uses a semicolon instead of a comma in its formulas?

Code:
=IF(A1<=12;"Children";IF(A1<=17;"Adolescent";"Adult"))
 
Upvote 0
You're welcome. Thanks for the feedback.
Peter's formula should also work for you (change , to ; ).
 
Last edited by a moderator:
Upvote 0

Forum statistics

Threads
1,215,140
Messages
6,123,270
Members
449,093
Latest member
Vincent Khandagale

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