verify sums that should agree

  • Thread starter Thread starter Bucky
  • Start date Start date
B

Bucky

I have a cell E5 that is =SUM(E1:E4) as well as =SUM(A5:D5). The
vertical and horizontal sums should agree. If they don't agree, then it
should display an error or shade the cell red.

Does Excel have any built-in features to do this verification?
Currently, I'm just doing it manually with

=IF(SUM(E1:E4) = SUM(A5:D5), SUM(E1:E4), "error")
 
Don said:
format>conditional format>formula is>your formula>format as desired

Thanks. I tweaked it a little bit. Here was my final formula:

cell E5 = SUM(E1:E4)
conditional format: cell value is not equal to =SUM(A5:D5), fill red

This is a easier to understand than my original formula:
=IF(SUM(E1:E4) = SUM(A5:D5), SUM(E1:E4), "error")
 
Back
Top