Formulas and Functions

Formulas and Functions

Ask for help with your formula and find examples of how others use formulas and functions to solve a similar problem.

Count number of days between two dates and return the difference and if early or late?

✭✭
edited 12/09/19 in Formulas and Functions

Hi there Smartsheet community,

I don't know if anyone can help me?

I am trying to work out a formula to calculate the number of days between 2 dates, and also return if this was early, late or on-time.

For example:

Column A- Start date (20/06/2018)

Column B - End date (31/05/2018)

Column C - 20 days Early

 

OR

Column A- Start date (20/06/2018)

Column B - End date (10/07/2018)

Column C - 20 days Late

and so on.

 

I do have an excel formula which works this out, however I can't find a way for it to work in Smartsheet:

=IF(COUNT(A2,B2)=2,TEXT(B2-A2,"0 ""Day(s) Late"";0 "" Day(s) Early"";""On Time"""),"")

 

This is as far as i have got:

=([Date1]1 - [Date2]1)

(As you can see I am no formula guru by any means.)

 

I just can't work out how to get the text functions to return "Early" "Late" or "On-Time".

 

Does anyone know of a way to do this?

Comments

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!

Trending in Formulas and Functions