#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
squirrel74
 
Posts: n/a
Default Rounding

I need a formula that will only round if the decimal of the result is greater
than something ##.5, otherwise I don't want the formula to round. Below is an
example of what I've developed so far, but I need to know how to enter in a
value into the formula to indicate a number with a decimal greater than .5

=IF(AVERAGE(B1:D1)=##.5,ROUND(AVERAGE(B1:D1),0),A VERAGE(B1:D1))

Ultimately what the formula will needs to do is average 3 numbers, rounding
up only if the resulting decimal value is greater than .5, otherwise, the
formula should not round at all.

Example:
When I enter the following numbers the results will round due to the decimal
being greater than or equal to .5
(90 + 76 + 70)/3 = 78.6667
Result to display will be 79

However if I enter the following numbers the results will not round due to
the decimal being less than .5
(85 + 80 + 70)/3 = 78.3333
Result to display will be 78.3333

Thank you to anyone that can help.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Richard Buttrey
 
Posts: n/a
Default Rounding

On Thu, 2 Mar 2006 07:46:32 -0800, "squirrel74"
wrote:

I need a formula that will only round if the decimal of the result is greater
than something ##.5, otherwise I don't want the formula to round. Below is an
example of what I've developed so far, but I need to know how to enter in a
value into the formula to indicate a number with a decimal greater than .5

=IF(AVERAGE(B1:D1)=##.5,ROUND(AVERAGE(B1:D1),0), AVERAGE(B1:D1))

Ultimately what the formula will needs to do is average 3 numbers, rounding
up only if the resulting decimal value is greater than .5, otherwise, the
formula should not round at all.

Example:
When I enter the following numbers the results will round due to the decimal
being greater than or equal to .5
(90 + 76 + 70)/3 = 78.6667
Result to display will be 79

However if I enter the following numbers the results will not round due to
the decimal being less than .5
(85 + 80 + 70)/3 = 78.3333
Result to display will be 78.3333

Thank you to anyone that can help.


If I've understood you correctly, a simple modification to your
formula is shown below. A1 holds the value of the decimal test value,
e.g. 0.5 in your example.

=IF(AVERAGE(B1:D1)-INT(AVERAGE(B1:D1))=A1,ROUND(AVERAGE(B1:D1),0),AV ERAGE(B1:D1))

HTH

Richard Buttrey
__
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
CLR
 
Posts: n/a
Default Rounding

Maybe....

=IF((A1-INT(A1))=0.5,ROUNDUP(A1,0),A1)

Vaya con Dios,
Chuck, CABGx3



"squirrel74" wrote:

I need a formula that will only round if the decimal of the result is greater
than something ##.5, otherwise I don't want the formula to round. Below is an
example of what I've developed so far, but I need to know how to enter in a
value into the formula to indicate a number with a decimal greater than .5

=IF(AVERAGE(B1:D1)=##.5,ROUND(AVERAGE(B1:D1),0),A VERAGE(B1:D1))

Ultimately what the formula will needs to do is average 3 numbers, rounding
up only if the resulting decimal value is greater than .5, otherwise, the
formula should not round at all.

Example:
When I enter the following numbers the results will round due to the decimal
being greater than or equal to .5
(90 + 76 + 70)/3 = 78.6667
Result to display will be 79

However if I enter the following numbers the results will not round due to
the decimal being less than .5
(85 + 80 + 70)/3 = 78.3333
Result to display will be 78.3333

Thank you to anyone that can help.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JE McGimpsey
 
Posts: n/a
Default Rounding

One way:

=ROUND(AVERAGE(B1:D1),15 - 15*(MOD(AVERAGE(B1:D1),1)=0.5))

In article ,
"squirrel74" wrote:

I need a formula that will only round if the decimal of the result is greater
than something ##.5, otherwise I don't want the formula to round. Below is an
example of what I've developed so far, but I need to know how to enter in a
value into the formula to indicate a number with a decimal greater than .5

=IF(AVERAGE(B1:D1)=##.5,ROUND(AVERAGE(B1:D1),0),A VERAGE(B1:D1))

Ultimately what the formula will needs to do is average 3 numbers, rounding
up only if the resulting decimal value is greater than .5, otherwise, the
formula should not round at all.

Example:
When I enter the following numbers the results will round due to the decimal
being greater than or equal to .5
(90 + 76 + 70)/3 = 78.6667
Result to display will be 79

However if I enter the following numbers the results will not round due to
the decimal being less than .5
(85 + 80 + 70)/3 = 78.3333
Result to display will be 78.3333

Thank you to anyone that can help.

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
Unwanted rounding of large number Candyman Excel Worksheet Functions 5 August 18th 05 12:32 AM
Rounding numbers to the nearest 5 or 0 Fieldmedic Excel Worksheet Functions 3 July 17th 05 06:51 AM
Rounding LaraHubbs Excel Discussion (Misc queries) 2 June 21st 05 09:42 PM
Banker's Rounding - need help! Somecallmejosh Excel Discussion (Misc queries) 3 January 20th 05 09:53 PM
How do I make Excel stop rounding off my numbers that are 16 digi. Aida Excel Discussion (Misc queries) 1 December 6th 04 04:34 PM


All times are GMT +1. The time now is 08:24 AM.

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

About Us

"It's about Microsoft Excel"