I have an Excel table which works fine most of the time. However, once in a while, I'd receive an error message saying "circular references" or some other formula error. It happened again this morning. The following are the formulae in cells T7, T8, T9, and T10.
Other columns may also have problems. These cells contain a formula. Thus, they are not touched, no manual entering of data.
To the best of my knowledge, the errors happened after I sorted some columns by clicking the little triangle on the headers though it did not happen every time I sorted. Maybe some combination of sorting made this happened. I'm not sure.
Errors like this always make me wonder whether the workbook is corrupted.
Code:
T7: =IF($L7-$O7<>0,IF($E7="team",IF(ISERROR(LOOKUP(2,1/(T$5:T6<>0),T$5:T6)),0,LOOKUP(2,1/(T$5:T6<>0),T$5:T6))+$L7-$O7,0),0)
T8: =IF($L8-$O8<>0,IF($E8="team",IF(ISERROR(LOOKUP(2,1/(T$5:T7<>0),T$5:T7)),0,LOOKUP(2,1/(T$5:T7<>0),T$5:T7))+$L8-$O8,0),0)
T9: =IF($L9-$O9<>0,IF($E9="team",IF(ISERROR(LOOKUP(2,1/([COLOR=#ff0000]T$4:T9[/COLOR]<>0),[COLOR=#ff0000]T$4:T9[/COLOR])),0,LOOKUP(2,1/([COLOR=#ff0000]T$4:T9[/COLOR]<>0),[COLOR=#ff0000]T$4:T9[/COLOR]))+$L9-$O9,0),0)
T10: =IF($L10-$O10<>0,IF($E10="team",IF(ISERROR(LOOKUP(2,1/(T$5:T9<>0),T$5:T9)),0,LOOKUP(2,1/(T$5:T9<>0),T$5:T9))+$L10-$O10,0),0)
To the best of my knowledge, the errors happened after I sorted some columns by clicking the little triangle on the headers though it did not happen every time I sorted. Maybe some combination of sorting made this happened. I'm not sure.
Errors like this always make me wonder whether the workbook is corrupted.
Last edited: