If Blank return no value

How would I eliminate the #INVALID VALUE entry when the Start Time is BLANK? Thanks for your help! Here is the formula below. It converts time to Military time.


=VALUE((VALUE(LEFT([Start Time]@row, FIND(":", [Start Time]@row) - 1)) - IF(VALUE(LEFT([Start Time]@row, FIND(":", [Start Time]@row) - 1)) = 12, 12, 0) + IF(RIGHT([Start Time]@row, 2) = "pm", 12, 0)) + MID([Start Time]@row, FIND(":", [Start Time]@row) + 1, 2))


Thank you.

Greg

Best Answer

  • L_123
    L_123 ✭✭✭✭✭✭
    Answer ✓

    iferror(formula,"")

    =iferror(VALUE((VALUE(LEFT([Start Time]@row, FIND(":", [Start Time]@row) - 1)) - IF(VALUE(LEFT([Start Time]@row, FIND(":", [Start Time]@row) - 1)) = 12, 12, 0) + IF(RIGHT([Start Time]@row, 2) = "pm", 12, 0)) + MID([Start Time]@row, FIND(":", [Start Time]@row) + 1, 2)),"")

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!