# IF function help

#### toniplavna

##### New Member
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)
• 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:
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
Hi. Try:
Code:
``=if([@[Customer Age]]<25,"Youth",if([@[Customer Age]]<35,"Youth Adults",if([@[Customer Age]]<65,"Adults","Seniors")))``

#### toniplavna

##### New Member
Hi. Try:
Code:
``=if([@[Customer Age]]<25,"Youth",if([@[Customer Age]]<35,"Youth Adults",if([@[Customer Age]]<65,"Adults","Seniors")))``

Thanks its working.
Can you tell me whats wrong with my function that I tried? Just want to better understand

#### sunny102

##### Board Regular
You have to include [@[Customer Age]] before <35 and <65

Thanks its working.
Can you tell me whats wrong with my function that I tried? Just want to better understand

#### toniplavna

##### New Member
So it can be done with IF AND function, can you edit my function from the begining ?

#### toniplavna

##### New Member
I tried that, not working.

#### sunny102

##### Board Regular
Use this

I tried that, not working.

#### toniplavna

##### New Member
Thanks. I missed those ) after 35 and 65

Replies
1
Views
141
Replies
5
Views
798
Replies
6
Views
375
Replies
1
Views
466
Replies
1
Views
109

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.

### Which adblocker are you using?

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

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