Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 94
Default if function with rounding

I need to set up a function that rounds numbers up to the nearest whole
number if the decimal is greater than .5 and the number is odd, and rounds
down to the nearest whole number if the decimal is less than .5 with an odd
integer or if it is even no matter what the decimal is. Does anyone know if
there is a way to set this up?? I am trying to help out a co-worker, and I
hit a wall with this spreadsheet.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default if function with rounding

=ROUND(A1,0)-(INT(A1/2)*2=INT(A1))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Holly" wrote in message
...
I need to set up a function that rounds numbers up to the nearest whole
number if the decimal is greater than .5 and the number is odd, and rounds
down to the nearest whole number if the decimal is less than .5 with an
odd
integer or if it is even no matter what the decimal is. Does anyone know
if
there is a way to set this up?? I am trying to help out a co-worker, and I
hit a wall with this spreadsheet.

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 94
Default if function with rounding

the only problem is a whole number needs to stay the same

and I typed in 54 and its giving me 53

"Bob Phillips" wrote:

=ROUND(A1,0)-(INT(A1/2)*2=INT(A1))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Holly" wrote in message
...
I need to set up a function that rounds numbers up to the nearest whole
number if the decimal is greater than .5 and the number is odd, and rounds
down to the nearest whole number if the decimal is less than .5 with an
odd
integer or if it is even no matter what the decimal is. Does anyone know
if
there is a way to set this up?? I am trying to help out a co-worker, and I
hit a wall with this spreadsheet.

Thanks




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default if function with rounding

One way:

=INT(A1)+(ROUND(MOD(A1,2),12)=1.5)


In article ,
Holly wrote:

I need to set up a function that rounds numbers up to the nearest whole
number if the decimal is greater than .5 and the number is odd, and rounds
down to the nearest whole number if the decimal is less than .5 with an odd
integer or if it is even no matter what the decimal is. Does anyone know if
there is a way to set this up?? I am trying to help out a co-worker, and I
hit a wall with this spreadsheet.

Thanks

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default if function with rounding

=ROUND(A1,0)-(INT(A1/2)*2=INT(A1))*(MOD(A1,1)0)

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Holly" wrote in message
...
the only problem is a whole number needs to stay the same

and I typed in 54 and its giving me 53

"Bob Phillips" wrote:

=ROUND(A1,0)-(INT(A1/2)*2=INT(A1))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)

"Holly" wrote in message
...
I need to set up a function that rounds numbers up to the nearest whole
number if the decimal is greater than .5 and the number is odd, and
rounds
down to the nearest whole number if the decimal is less than .5 with an
odd
integer or if it is even no matter what the decimal is. Does anyone
know
if
there is a way to set this up?? I am trying to help out a co-worker,
and I
hit a wall with this spreadsheet.

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
Is there a function to do ASTM-29-67 rounding ? EC Excel Worksheet Functions 2 November 22nd 06 07:11 PM
rounding function rcc Excel Discussion (Misc queries) 5 August 9th 06 09:18 PM
Rounding up the result of an IF function donnaK Excel Worksheet Functions 3 December 8th 05 10:15 PM
Function Rounding Lost Excel Discussion (Misc queries) 3 August 11th 05 09:15 AM
how to get the rounding function off Cynthia A Excel Worksheet Functions 1 June 4th 05 03:36 AM


All times are GMT +1. The time now is 05:40 PM.

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"