Getting error with Excel formulas

Dharaneesh K 20 Reputation points
2026-07-09T11:23:05.4666667+00:00

User's image

When i use this formula in web app, its working fine but in desktop im getting error

Microsoft 365 and Office | Excel | For education | Windows
0 comments No comments

Answer accepted by question author
Marcin Policht 109.1K Reputation points MVP Volunteer Moderator
2026-07-09T13:24:42.3166667+00:00

The formula itself looks valid, so if it works in Excel for the web but produces a syntax error in the desktop application, the issue is most likely related to your desktop Excel's regional settings rather than the formula itself.

Many desktop installations of Excel use semicolons (;) instead of commas (,) to separate function arguments. Try replacing the commas with semicolons so the formula becomes =DATEDIF(E2;TODAY();"Y")-5. If this works, your Excel is configured to use semicolons as the list separator.

Another possibility is that the value in cell E2 is stored as text instead of a real date. Although your screenshot suggests a parsing error rather than a data issue, it is still worth confirming that E2 contains a valid Excel date.

You can also test whether your Excel uses commas or semicolons by entering either =SUM(1,2) or =SUM(1;2). Whichever formula works indicates the correct argument separator for your installation.


If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

hth

Marcin

Was this answer helpful?

2 people found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Oldest
  1. Dharaneesh K 20 Reputation points
    2026-07-09T14:01:50.0133333+00:00

    I found that in my system it is "|" than "," . How to change this setting

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.