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

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

Osvaldo Palmeiro

Well-known Member
Joined
Feb 24, 2009
Messages
728
Office Version
  1. 365
Platform
  1. Windows
Hi. Try:
Code:
=if([@[Customer Age]]<25,"Youth",if([@[Customer Age]]<35,"Youth Adults",if([@[Customer Age]]<65,"Adults","Seniors")))
 
Upvote 0

toniplavna

New Member
Joined
Dec 25, 2016
Messages
10
ADVERTISEMENT
So it can be done with IF AND function, can you edit my function from the begining ?
 
Upvote 0

sunny102

Board Regular
Joined
Dec 19, 2016
Messages
102
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,195,664
Messages
6,011,019
Members
441,579
Latest member
satishrazdhan

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
Top