MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Excel 97 problem


Posted by Jay on December 17, 2001 8:44 PM

I am trying to get the sum of different cells to total in one cell--IF-- the totals agree.
For example, I want the sum of J9+J24 to show in J26, --IF-- the sum is the same as H37-G31-G32. If the different cells do not agree, I would like it to say error or something to alert me.


Posted by DaK on December 17, 2001 9:21 PM

Try this formula in one of your cells
=IF(SUM(J9,J24)<>SUM(H37,G31,G32),"error",SUM(J9,J24)+SUM(H37,G31,G32))

DaK

Posted by Ian Mac on December 18, 2001 7:02 AM

use

=IF(SUM(J9,J24)=H37-G31-G32,SUM(J9,J24),"error")

Ian Mac

Posted by DaK on December 18, 2001 1:16 PM

oops ,duh.


I wasn't paying attention, I was thinking that H37-G32-G31 was a series of cells to sum, not subtract. Duh, duh, duh.
Sorry for the confusion.
DaK