Forum Discussion

John Stewart's avatar
John Stewart
Copper Contributor
Mar 26, 2018

Text combined with formula result

I'm comparing time intervals and cannot display a negative result. To get around that, I have

 

IF(H3>M3,H3-M3,M3-H3)

 

To indicate a negative value, I want to show a "-" before the result of H3-M3. I'm pretty much a novice. Can I do this, or is there an easier way to achieve what I want?

1 Reply

  • JKPieterse's avatar
    JKPieterse
    Silver Contributor

    Like so:
    =IF(H3>M3,H3-M3,TEXT(M3-H3,"-hh:mm")

    Note that for negative times your cell now actually contains a text value.