When Your Spreadsheet Can't Tell If Two Numbers Match

Are you frustrated with formatting rules in spreadsheets that just don’t seem to work?

3 min readMicrosoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

Here's the thing about your spreadsheet problem: it's not a formatting issue, and it's not a bug you can click your way around. It's a fundamental truth about how computers handle numbers, and once you see it, you'll stop blaming yourself and start working with the system instead of against it.

Your example is perfect: A=1197.6, B=53.3, C=1250.9. On paper, C minus A equals B. But your spreadsheet doesn't think in paper. It thinks in binary, and 1197.6 and 53.3 aren't stored as the clean decimals you typed. They're stored as the closest binary approximations, which are slightly off. When you subtract A from C, the result isn't 53.3. It's 53.29999999999995, or something equally infuriating. Your conditional formatting rule isn't wrong. It's doing exactly what you asked: it's checking if C minus A equals B, and in the computer's eyes, it doesn't. That's why only B turns red while A and C stay white. They're all subject to the same hidden imprecision, but only one of them happens to trip the comparison.

What you're experiencing isn't a quirk of your version or your Mac. It's the reason why spreadsheet experts harp on about rounding and precision. The fix isn't to delete your rules or abandon conditional formatting. It's to stop asking "does this equal that?" and start asking "is this close enough?" Wrap your formula in something like `ROUND(C-A,1)`, or compare `ABS(C-A-B)` to a tiny tolerance like 0.001. That tells the spreadsheet to compare the numbers you see, not the ghostly binary leftovers hiding underneath. You tested this yourself: typing `=53.2+0.1` fails, but `=53.2+0.1` with rounding works. That's not a mystery. That's the system being honest with you about its own limitations.

The practical takeaway is simpler than it feels. When a spreadsheet rule fails for one set of numbers and works for another, stop assuming you made a mistake. Start assuming the numbers have a hidden layer. Add a rounding function or a tolerance check to your rule, and the red fill will behave the way you intended. You don't need to become a computer scientist. You just need to know that "equal" in a spreadsheet is a stricter judge than "equal" in your head. Adjust your rule to meet that standard, and your 53.3 will finally stay white.

From Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

I have been having a problem with formatting rules recently. What I want is really straightforward, I have 3 boxes, A, B and C, and I want to make sure that A+B=C all the time.

If C-A≠B then B has to fill with red background. BUT it doesn't work, even when C-A=B box stays red

Read the original at Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community