IF function help

toniplavna

New Member
Joined
Dec 25, 2016
Messages
10
Hello,
I have a Excel 2016 and trying to complete some tutorial but i get formula error. I need to get this:

[FONT=&quot]Next, let's add an "Age Group" column. Insert a new column to the left of the Customer Gender, and use formula to derive the age group from the Customer Age column. Let's group the customers based on the following criteria:[/FONT]

    • Youth (<25)
    • Young Adults (25-34)
    • Adults (35-64)
    • Seniors (>64)
[FONT=&quot]HINT: Use the nested IF() functions. Alternatively, you can use the IFS() function if it is available in your version (2016 + updates from O365)

So I wrote:
=if([@[Customer Age]]<25,"Youth",if(and([@[Customer Age]]>24,<35,"Youth Adults",if(and([@[Customer Age]]>34,<65,"Adults",if([@[Customer Age]]>64,"Seniors"))))
Not working... I think that problem is when i have 2 requirements like >24,<35, something there is wrong :/ Help[/FONT]


****** id="cke_pastebin" style="position: absolute; top: 274.578px; width: 1px; height: 1px; overflow: hidden; left: -1000px;">requirement</body>
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Hi. Try:
Code:
=if([@[Customer Age]]<25,"Youth",if([@[Customer Age]]<35,"Youth Adults",if([@[Customer Age]]<65,"Adults","Seniors")))
 
Upvote 0
Use this

=if([@[Customer Age]]<25,"Youth",if(and([@[Customer Age]]>24,[@[Customer Age]]<35),"Youth Adults",if(and([@[Customer Age]]>34,[@[Customer Age]]<65),"Adults",if([@[Customer Age]]>64,"Seniors"))))

I tried that, not working.
 
Upvote 0

Forum statistics

Threads
1,214,405
Messages
6,119,315
Members
448,886
Latest member
GBCTeacher

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