Selected Answer

Please try this formula.

`=IF(TEXT(IFERROR(INDEX(Sheet1!$A$1:$S$500,MATCH(AH57,Sheet1!$I$1:$I$500,FALSE),2),""),"hh:mm")="02:59","ongoing",IFERROR(INDEX(Sheet1!$A$1:$S$500,MATCH(AH57,Sheet1!$I$1:$I$500,FALSE),2),""))`

In order to explain it, here is the short version of it.

`=IF(TEXT(D4,"hh:mm")="02:59,"ongoing",D4)`

In the long version "D4" is replaced with your original formula, twice. The difference is that the formula looks for a number that *translates* into a displayed value of 02:59. That allows for a lot of leeway around the more precise value of 0.124305555555556.

However, =TEXT(D4,"hh:mm") returns 14:09 if D4 contains a string (text value) of "02:59". I feel that your referenced cell, more likely, actually does contain a text value, at least when it displays "02:59" and perhaps a real time at other times. Fake time, one would say now a-days lol: In the case of a fake time the short formula would have to look like this.

`IF(D4="02:59","ongoing",D4)`

Or you might cover both possibilities with this formula.

`IF(OR(TEXT(D4,"hh:mm")="02:59",D4="02:59"),"ongoing",D4)`

In both cases replace all occurrences of D4 with your original formula (which I couldn't test). And, in any event, watch the formatting of the cell where you have the formula. It must be designed to take the value from the referenced cell. Excel will copy the format from that source for good emasure if left to its own devices. However, I suppose you have interfered so much already that you will need to take full control.