# What's wrong with my Calculated Column Formula Syntax?

I have a SharePoint list with 2 columns: Age and Age Group. The age groupings I want to display in the second columns are:

• Under 16
• 16-20
• 21-30
• 31+

This is the formula I've tried:

``````=IF([Age]<16;"Under 16";IF([Age]<21;"16-20";IF([Age]<31;"21-30";"31+")))
``````

But this returns a Syntax Error. Can anyone spot whats wrong with the formula?

• Try using comma ( `,`) instead of semicolon (`;`). let me know if it works. Also, make sure you are using correct display name of your column. May 18, 2023 at 14:15
• What is data/column type of [Age] column, Number or single line of text? May 18, 2023 at 14:16
• [Age] is a calculated column that returns an Integer.
– JonS
May 19, 2023 at 20:07

Your formula syntax looks good to me. Try using comma ( `,` ) instead of semicolon ( `;` ) everywhere in formula like:

``````=IF([Age]<16,"Under 16",IF([Age]<21,"16-20",IF([Age]<31,"21-30","31+")))
``````

Assuming `[Age]` column is of type Number.

Calculated column settings:

Output:

Note:

1. Sometimes semicolon(`;`) does not work in formula (it is based on language or regional settings on your site). So in that case use comma(`,`) instead of semicolon(`;`).
2. Use correct display name of your SharePoint columns in above formula.

Official Documentations:

If `[Age]` column is of type Single line of text, use this formula:

``````=IF(VALUE([Age])<16,"Under 16",IF(VALUE([Age])<21,"16-20",IF(VALUE([Age])<31,"21-30","31+")))
``````