IF function to create age bracket in Excel 2
machacha
-
pépé35530 Posted messages 2951 Registration date Status Membre Last intervention -
pépé35530 Posted messages 2951 Registration date Status Membre Last intervention -
Hello everyone,
I would like to refer, based on the ages of a list of people, to age ranges as below
Column A: Name
...
Column F: Age
Column G: Age Range (if function referring to age)
My conditions are as follows:
25 and under,
25 - 29
30 - 35
35 - 39
40 - 44
45 - 50
50 - 55
56 and over
The following formula only returns to the first and last condition, and I cannot find where the error is:
=if(F2<=25;"25 and under";IF(25<F2<=30;"25-29";IF(30<F2<35;"30-34";IF(35<=F2<40;"35-39";IF(40<=F2<45;"40-44";IF(45<=F2<50;"45-49;IF(50<=F2<56;"50-55""56 and over"))))))
Thank you for your help,
Machacha
I would like to refer, based on the ages of a list of people, to age ranges as below
Column A: Name
...
Column F: Age
Column G: Age Range (if function referring to age)
My conditions are as follows:
25 and under,
25 - 29
30 - 35
35 - 39
40 - 44
45 - 50
50 - 55
56 and over
The following formula only returns to the first and last condition, and I cannot find where the error is:
=if(F2<=25;"25 and under";IF(25<F2<=30;"25-29";IF(30<F2<35;"30-34";IF(35<=F2<40;"35-39";IF(40<=F2<45;"40-44";IF(45<=F2<50;"45-49;IF(50<=F2<56;"50-55""56 and over"))))))
Thank you for your help,
Machacha
Configuration: Windows XP Internet Explorer 6.0
3 réponses
Hello,
Your syntax is incorrect.
Try this formula:
=IF(F2<25,"25 and under",IF(F2<30,"25 to 29",IF(F2<35,"30 to 35",IF(F2<40,"35 to 40 years",IF(F2<45,"40 to 45 years",IF(F2<50,"45 to 50 years",IF(F2<55,"50 to 55 years",IF(F2>=55,"over 55 years",""))))))))))
On another note, check the boundaries to determine how to categorize people.
See you!
Your syntax is incorrect.
Try this formula:
=IF(F2<25,"25 and under",IF(F2<30,"25 to 29",IF(F2<35,"30 to 35",IF(F2<40,"35 to 40 years",IF(F2<45,"40 to 45 years",IF(F2<50,"45 to 50 years",IF(F2<55,"50 to 55 years",IF(F2>=55,"over 55 years",""))))))))))
On another note, check the boundaries to determine how to categorize people.
See you!