View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default If function not working correctly

Hi,

Because you have your cells set to 2 decimal places the sums may 'appear'
balanced but may not be. For example
1.0234
1.0235
set to 2 decimal places bith display in the cell as 1.02 but they arent the
same. So it depends on what level of equality you want. If 2 decimal places
is enough try

=IF(ROUND(F2,2)=ROUND(SUM(G2:U2),2),"Balanced","No t Balanced")

You can increase the rounding to 3 if you want greater accuracy.

Mike

"Relle" wrote:

Hi I'm using Excel 2003
Formula
=IF(F2=SUM(G2:U2),"Balanced","Not Balanced")
F2 and G2:U2 are all sum functions.

The formula seems to work fine then all of a sudden I get a "Not Balanced"
when the values are correct. I'm using 2 decimal places and have ensured the
whole page is set as this.

I use a separate spreadsheet each month and the problem normally comes up
towards the bottom of the page, (normally about 300 row entries), but this
month it's cropped up after 6 rows. Previously I've been able to delete a few
rows, type in a few other entries, then re-type the amounts that were causing
the problem again and it seems to fix it.
Not today though.
Any suggestions.
Thanks

--
Relle