Hi BLBARBER,
Thank you for your update! I tried to research and here’s solution for your error:
- Syntax Error Identified:
- Your formula appears to have inconsistent spacing, and line breaks that SharePoint doesn't recognize. Calculated columns require continuous single-line formulas without line breaks.
- Corrected Formula:
=[Sdate] - IF(ISNUMBER(SEARCH("-Days", [Priority])), VALUE(LEFT([Priority], SEARCH("-", [Priority]) - 1)), IF(ISNUMBER(SEARCH("-Weeks", [Priority])), VALUE(LEFT([Priority], SEARCH("-", [Priority]) - 1)) * 7, 0))
- Validation Steps:
- Check Column Names: Verify Sdate and Priority match exact internal names (go to column settings > check "Name" field).
- Test Simple Cases First: Try a basic formula like =[Sdate] - 1 to confirm the column works, then add complexity.
- Date Format: Ensure Sdate is a valid date column (your output type "Date Only" is correct).
- Common Pitfalls:
- Text vs. Numbers: LEFT() returns text—use VALUE() to convert to a number.
- Hyphen Logic: If Priority uses formats like "5-Days" or "2-Weeks", the formula should work. For other formats (e.g., "High"), it defaults to 0.
- Next Steps:
- Copy the corrected formula above exactly into your calculated column.
- If it fails again, share a sample value of Priority and Sdate for further debugging.
If the error persists, I strongly recommend you submit a Support Ticket (Your IT admin can escalate this to Microsoft via) https://admin.microsoft.com/#/support/requests for further and deeper step by step assistance.
Warmest regards,
Vicky-I -MSFT | Microsoft Community Support Specialist