Forum Discussion
Multiple IF Formula
While I couldn't figure out the exact issue, I received the same error when I copy/paste your test formula. I erased it and started building it one element at a time. I started with
=IF([HOTEL]="","1","2")
and substitute one string at a time, testing between each change. I ended up with
=IF([HOTEL]="CVS - Centralværkstedet","info@t.dk","Test")
which works. It looks the same, but something is different. (I suspect a hidden invalid character.) Just keep building the formula piece by piece. It's slow and frustrating sometimes, but without a better error message from SharePoint, there is not much else you can do. It will either work, or you will find the exact change that is causing the issue.
If this helps, please consider marking it as the solution. Thanks and good luck!
Don
https://support.microsoft.com/en-us/office/introduction-to-sharepoint-formulas-and-functions-94e1b4cc-cd1c-49c2-80ec-90c9b9591f47
has the following statement:
Nesting level limits A formula can contain up to eight levels of nested functions.
It doesn't explain the issue in the test formula, but you will need to make changes based on number of nested formulas. It will take multiple calculated fields to reach the final result.
Basic approach I would take is maximize the nesting in the first calculated column, with the final result being either the custom result from one of the nested IFs, or the original HOTEL if none match. Then in the next calculated column, the initial IF will test IF [Calc1]=[HOTEL]. If they match, add additional IFs. If they don't match, return the value of Calc1.