Conditional formatting Issue

Copper Contributor

I have data in Microsoft Excel that I use conditional formatting on.  To ensure that all entries for a particular day are referenced in a daily total cell, I have set up a totals cell for the daily totals and have it conditionally formatted to flag red if the total there is different then the weekly total shown (See the screen shot).  However, on some occasions, for reasons I am stumped to find, the system will flag the daily column red when the totals do in fact match.  I have checked the formatting of the cell, the same on both.  I have checked for leading and trailing zeros, there are none.  Both are exactly the same equation set ups, they are a =SUM(the cells immediately above for the entire week).  I have deleted and reset the conditional formatting for this particular cell, no change.  I am uncertain what else can be done to possibly fix this issue.

6 Replies

@MrsBenson Could be a rounding error. Though difficult to diagnose with seeing the formulas an underlying data.

With a rounding error, would that be something that lays in the formatting of the cells. At this time all of the cells, the ones being used for the sum as well as the sums themselves, are all formatted using the custom format of "[h]:mm"

@MrsBenson Don't know. Time entries are in fact numbers with quite a few decimals. Summing 5 summed values of 6hrs and 38min that add up to 33hrs and 10min may give a slightly different total than summing 10 individual. But perhaps it's not that at all.

@MrsBenson 

Formatting doesn't affect values, that only defines how to show them.

What throws me with this is the same conditional formatting is used repeatedly throughout the file on similar groupings without issues. It is just this one grouping, and just with this one total. If I change one of the values to change the overall total, even by 1 minute, it resolves and the conditional formatting does not color the cell.

@MrsBenson 

Excel, as any other software, internally works with bits and number of bits involved into operations is limited. Thus we have floating point errors Floating-point arithmetic may give inaccurate result in Excel - Office | Microsoft Docs . Great sample is here Understanding Floating Point Precision, aka “Why does Excel Give Me Seemingly Wrong Answers?” | Micr... , =1*(.5-.4-.1) is not exactly equal to zero.

 

Taking into account time in Excel is just decimal part of the number (e.g. 01:00:00 = 1/24) you shall take care about precision. In one case time aggregation could give exact result you expect, in other case it could differ on something like 1e-27. You never know.