If Funtion

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a if function =IF(SUM(F10:F52)=GM!$B$21,GM!$B$21,"wrong sum").
This looks up the some of one sheet and compares it to another to see if
they are the same. To come up with a sum I have different qty's of units.
Some times w. qty of 2 it works but w. qty of 3 it doesn't. 9 decimal places
out is the problem.
348,822.64024607600000000000000000
348,822.64024607500000000000000000
How can I convert this so it only looks at 3 or 4 decimals out.

Thanks
 
Maybe try the ROUND function..........

=IF(ROUND(SUM(F10:F52))=ROUND(GM!$B$21),GM!$B$21,"wrong sum")

Vaya con Dios,
Chuck, CAGBx3
 
Hi!

Try this:

=IF(ROUND(SUM(F10:F52),3)=GM!$B$21,GM!$B$21,"wrong sum")

Change the rounding factor to suit.

If GM!B21 is also a calculated value then you may also need to round that so
the comparison is accurate:

=IF(ROUND(SUM(F10:F52),3)=ROUND(GM!$B$21,3),ROUND(GM!$B$21,3),"wrong sum")

Biff
 
THE SECOND ONE WORKED
Thanks
David

Biff said:
Hi!

Try this:

=IF(ROUND(SUM(F10:F52),3)=GM!$B$21,GM!$B$21,"wrong sum")

Change the rounding factor to suit.

If GM!B21 is also a calculated value then you may also need to round that so
the comparison is accurate:

=IF(ROUND(SUM(F10:F52),3)=ROUND(GM!$B$21,3),ROUND(GM!$B$21,3),"wrong sum")

Biff
 
Yours didn't work but this did


=IF(ROUND(SUM(F10:F52),3)=ROUND(GM!$B$21,3),ROUND(GM!$B$21,3),"wrong sum")

Thanks
David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top