A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Another Option:
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am trying to calculate the age generation using the following excel function but somehow it gives me an error message.
=IF(YEAR(AE7)<1946;"Traditionals";IF(AND(YEAR(AE7)>=1946;YEAR(AE7)<=1964);"Baby Boomers";IF(AND(YEAR(AE7)>=1965;YEAR(AE7)<=1977);"Gen X";IF(AND(YEAR(AE7)>=1978;YEAR(AE7)<=1995);"Millennials";IF(AND(YEAR(AE7)>=1995;"Gen Z";"FALSE")))))
Being AE the column with the date of birth.
Can someone help me with this formula?
Thank you in advance.
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Answer accepted by question author
Answer accepted by question author
Not sure I follow. When you put the IF's in the correct order it should return the correct category. For instance, someone born in 1950 will not be <1946 but will be <=1964, so he/she will be a baby boomer. No need to set the lower boundary.
Actually, it would be easier to use a LOOKUP to avoid the nested IF statements.
Answer accepted by question author
I believe this one will work:
=IF(YEAR(AE7)<1946;"Traditionals";IF(YEAR(AE7)<=1964;"Baby Boomers";IF(YEAR(AE7)<=1977;"Gen X";IF(YEAR(AE7)<=1995;"Millennials";IF(YEAR(AE7)>=1995;"Gen Z")))))
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
Comments have been turned off. Learn more
I believe this one will work:
=IF(YEAR(AE7)<1946;"Traditionals";IF(YEAR(AE7)<=1964;"Baby Boomers";IF(YEAR(AE7)<=1977;"Gen X";IF(YEAR(AE7)<=1995;"Millennials";IF(YEAR(AE7)>=1995;"Gen Z")))))
Hi,
Thanks for your help. However, it does not work 100% as it would be important to tag the generation age to a time interval, such as:
Traditionals (<1946)
Baby Boomers (1946-1964)
Gen X (1965-1977)
Millennials (1978-1995)
Gen Z (>1995)