Calculation error between two time stamps.

I am currently having a calculation error. first row total should be 2,50 but I am getting 3,50.

The second row calculation is correct with the exact same formula. Only difference is that the second row does not have any minutes.

=IFERROR(VALUE(LEFT([Time Out]@row; 2)) + (VALUE(RIGHT([Time Out]@row; 2)) / 60) - VALUE(LEFT([Time In]@row; 2)) + (VALUE(RIGHT([Time In]@row; 2)) / 60); 0)


I dont know where I am going wrong with this formula.


Any assistance will be appreciated.


M

Michelle Basson
Smartsheet Overachiever Alumni | Solution Architect | Lover of everything Smartsheet
https://www.linkedin.com/in/michelle-basson/

CERTIFIED SMARTSHEET PLATINUM PARTNER
www.projectplanservices.co.uk

Best Answer

  • Genevieve P.
    Genevieve P. Employee
    Answer ✓

    Hi @Michelle Basson

    Try adding parentheses around the two separate statements to ensure the math is calculating in the correct order:

    =IFERROR((VALUE(LEFT([Time Out]@row, 2)) + (VALUE(RIGHT([Time Out]@row, 2)) / 60)) - (VALUE(LEFT([Time In]@row, 2)) + (VALUE(RIGHT([Time In]@row, 2)) / 60)), 0)

    Let me know if this helped! 🙂

    Genevieve

    Join us for Jumpstart 2025 with Community on 23 January (in two time zones)! 🎉 Register here.

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!