#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
David
 
Posts: n/a
Default If Funtion

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

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
CLR
 
Posts: n/a
Default If Funtion

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

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

Vaya con Dios,
Chuck, CAGBx3



"David" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default If Funtion

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

"David" <dpal wrote in message
...
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



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
David
 
Posts: n/a
Default If Funtion

THE SECOND ONE WORKED
Thanks
David

"Biff" wrote:

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

"David" <dpal wrote in message
...
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




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
David
 
Posts: n/a
Default If Funtion

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

"CLR" wrote:

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

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

Vaya con Dios,
Chuck, CAGBx3



"David" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula format for Count or Countif funtion with two criterias Debi Excel Worksheet Functions 2 September 26th 05 08:23 PM
Date Value Funtion in Excel 2003 returns an error, but not in Exce olearyd Excel Worksheet Functions 1 April 13th 05 04:59 PM
Excel funtion to find how many boxes in larger container logistics learner Excel Worksheet Functions 3 December 21st 04 01:18 AM
How do I perform operations within a funtion that operates on colu crander8 Excel Discussion (Misc queries) 3 November 29th 04 10:15 PM
Help with setting up a worksheet funtion mjh Excel Worksheet Functions 2 November 11th 04 10:06 PM


All times are GMT +1. The time now is 01:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"