#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Formula help

I need a formula that will round down a number if it is less than .75
and round up if it is greater. So, for example, 2.69 would round down
to 2 and 2.89 would round up to 3.

Thanks so much!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,059
Default Formula help

On May 13, 9:33*am, Anonymous wrote:
I need a formula that will round down a number if it is
less than .75 and round up if it is greater. *So, for
example, 2.69 would round down to 2 and 2.89 would round
up to 3.


If your original number is in A1, ostensibly:

=INT(A1)+(MOD(A1,1)=0.75)

However, there are many values that might display as x.75 in A1, but
which round down to x using that formula. Perhaps you will be happier
with the results from:

=INT(A1)+(ROUND(MOD(A1,1),2)=0.75)
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,045
Default Formula help

On Fri, 13 May 2011 09:33:00 -0700 (PDT), Anonymous wrote:

I need a formula that will round down a number if it is less than .75
and round up if it is greater. So, for example, 2.69 would round down
to 2 and 2.89 would round up to 3.

Thanks so much!


What about if the value of the decimal portion is exactly equal to 0.75.

And how do you want to handle negative numbers?

Perhaps:

=ROUND(A1-SIGN(A1)*0.25,0)

This assumes that Round UP/DOWN implies rounding away from or closer to zero.
And also that numbers where the decimal portion is exactly 2.75 will round up.

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



All times are GMT +1. The time now is 03:40 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"