0

This is my format in the calculated formula:

=TEXT([Column2]-[Column1];"hh:mm:ss")

I have value "2018-12-13 10:10:23" in Column1 but when Column2 is blank the calculated column shows "10:10:23" based of Column1.

Is there anyway to make it blank or say some text instead?

Tried this code in calculated column but with no success:

=IF(ISBLANK([Column2]);"no value";)=TEXT([Column2]-[Column1];"hh:mm:ss")

1 Answer 1

2

IF has three parts, condition, result if true, result if false.

=IF( a>b, "a is greater", "a is not greater" )

So:

=IF( ISBLANK(Column2); "no value"; TEXT(Column2-Column1;"hh:mm:ss") )

or

=IF( ISBLANK(Column2); ""; TEXT(Column2-Column1;"hh:mm:ss") )
2
  • Thanks, it finally worked! But for some reason I had to put [ ] in the code. Do you know why? =IF(ISBLANK([Column2);"Inte påbörjat";TEXT([Column2]-[Column1t];"hh:mm:ss"))
    – 288088
    Nov 13, 2019 at 13:49
  • Square brackets are only required when spaces or other special characters are in the column's name. "Column1", optional, "Column 1" required. Nov 13, 2019 at 21:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.