Forum Discussion
JoelGDucharme
Feb 26, 2024Brass Contributor
Calculate age from a birth day and create age groups
I have a Sharepoint list for registration of a competition grouping participants in different age groups. I would like to program a column that calculates the age of a participant on January 1st 2024...
- Feb 26, 2024It's so satisfying to find the solution myself! Here is what I found for the grouping column:
=IF(Âge>18,"non",IF(Âge>13,"Groupe 5",IF(Âge>11,"Groupe 4",IF(Âge>8,"Groupe 3",IF(Âge>6,"Groupe 2",IF(Âge>4,"Groupe 1",IF(Âge>0,"non")))))))
It works perfectly!
JoelGDucharme
Feb 26, 2024Brass Contributor
Ok. I found a way to make it work for the age. This is the formula
=DATEDIF([Date de naissance],[1e janvier 2024],"Y")
Where [1e janvier 2024] is a column with a default value of January 1st 2024. Since it's a Microsoft Forms that feeds this list, I'm not worried that someone changes this value. And I will hide the column. It works. Now to figure out part 2.
=DATEDIF([Date de naissance],[1e janvier 2024],"Y")
Where [1e janvier 2024] is a column with a default value of January 1st 2024. Since it's a Microsoft Forms that feeds this list, I'm not worried that someone changes this value. And I will hide the column. It works. Now to figure out part 2.
JoelGDucharme
Feb 26, 2024Brass Contributor
It's so satisfying to find the solution myself! Here is what I found for the grouping column:
=IF(Âge>18,"non",IF(Âge>13,"Groupe 5",IF(Âge>11,"Groupe 4",IF(Âge>8,"Groupe 3",IF(Âge>6,"Groupe 2",IF(Âge>4,"Groupe 1",IF(Âge>0,"non")))))))
It works perfectly!
=IF(Âge>18,"non",IF(Âge>13,"Groupe 5",IF(Âge>11,"Groupe 4",IF(Âge>8,"Groupe 3",IF(Âge>6,"Groupe 2",IF(Âge>4,"Groupe 1",IF(Âge>0,"non")))))))
It works perfectly!