View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips Bob Phillips is offline
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