Reputation: 1063
I am trying to create an If statement in Excel that calculates the difference between two dates (in this case "Required Submission Date" and "Actual Submission Date"), and then outputs the absolute value of this number and follows it with "Days overdue" or "Days until due" accordingly.
I have attempted converting the number to a text string after the calculation:
=IF((H11-J11)<0,TEXT(H11-J11,0)"Days overdue", TEXT(H11-TODAY(),0)"Days Until Due")
I have also attempted this:
=IF((H11-J11)<0,abs(H11-J11)"Days overdue", (abs(H11-TODAY()))"Days Until Due")
Is there any way to achieve what I am after? i.e. if the submission is overdue, it should return "XX days overdue"
Thanks
Upvotes: 3
Views: 4370
Reputation: 3618
You are almost there. It should be :
=IF((H11-J11)<0,abs(H11-J11) & " Days overdue",(abs(H11-TODAY())) & " Days Until Due")
In fact you are just missing the string concatenation character &
.
Upvotes: 2