nested if function with wild card (3 variables)

T

tuckerc

I need a function to do the following:

add G5 + I5 and if the result is:
= *.6 (ie 5.6 or 205.7) then return a rounded up value of G5+I5 t
the nearest whole #

<= *.4 (ie 5.4 or 205.4) then return a rounded down value of G5+I5 t
the nearest whole #

= *.5, then return the value itself (ie 5.5 or 205.5
 
R

Ron Rosenfeld

I need a function to do the following:

add G5 + I5 and if the result is:

the nearest whole #

<= *.4 (ie 5.4 or 205.4) then return a rounded down value of G5+I5 to
the nearest whole #

= *.5, then return the value itself (ie 5.5 or 205.5)

I changed your specification a bit as you don't specify what you want to happen
if the result is between 0.4 and 0.5, or between 0.5 and 0.6.


=INT(G5+I5)+(MOD(G5+I5,1)>0.5)+(MOD(G5+I5,1)=0.5)/2


--ron
 
Top