Search code examples
excelms-office

Iferror in case of negative date doesn't apply in excell


I have two date like this:

enter image description here

In case of negative time-error ,I want to subtract them reverse but it doesn't work correctly.


Solution

  • It's not an error, when you have a negative time or it's to long, Excel show this information like this (############).

    In that case it's better use a normal condition like this:

    =If(D5-D6<0; D6-D5; D5-D6)
    

    In this case you have a correct result.