if greater than *.512

pbnav

New member
Local time
Today, 12:20
Joined
Oct 17, 2008
Messages
2
I have a list of values such has;
12.452
115.153
18.642

How can I add 0.512 to the number only if the decimal value is greater than .512 to get;
12.452
115.153
19.154

The list is being populated using ‘SUM($A17:$E17)-(ROUNDDOWN((SUM($A17:$E17))/128,0)*128)’ so I would like to add the IF THEN to that if possible.

Many thanks,
Paul
 
YourValue - Int(YourValue)
...will return just the decimal portion of YourValue.
 
Howzit

This will work

Code:
=IF((yourcell-INT(yourcell))>0.512,yourcell+0.512,yourcell)
 
Thanks! that was easier than i had though.

'IF(SUM($A17:$E17) - INT(SUM($A17:$E17)) >=0.512,(SUM($A17:$E17)-(ROUNDDOWN((SUM($A17:$E17))/128,0)*128))+0.512,SUM($A17:$E17)-(ROUNDDOWN((SUM($A17:$E17))/128,0)*128))'

:)
 
You can also use MOD

e.g.

=A1+IF(MOD(A1,1)>0.512,0.512,0)
 

Users who are viewing this thread

Back
Top Bottom