I am trying to create a string formula to try and gauge how accurate our sales team are when they are estimating how long it will take to close a deal. If they are within the 14 day period from the closing date it should show "On Time". If they are outside of 14 day period of when the deal closes it will show either "Early" or "Late" in the field.
I tested the formula in gsheets and it is working, but when I try to add it in the CRM formula field I am getting a "wrong data type" error.
If(And(
(Datecomp(${Opportunities.Estimated Closing Date},${Opportunities.Closing Date})/1440)>=-14,
(Datecomp(${Opportunities.Estimated Closing Date},${Opportunities.Closing Date})/1440)<=14)==true,'On Time',
If(
(Datecomp(${Opportunities.Estimated Closing Date},${Opportunities.Closing Date})/1440)<=-15,'Late','Early'))