• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Get an integer with a condition

pao13

Member
Hi. I'm struggling to make a formula for the following. If a number is between .00 and .33 (not including 0.33) in decimals (eg 25 to 25.33 but not including 25.33) to return in another column the integer below the closest (eg 24 in the case of 25 to 25.33) and if its 0.33 or above to return the integer above +1. I will make an example so you understand.

Example

A B
25.1 24
25.2 24
25.32 24
25.33 27
25.8 27
24.7 26
24.4 26
24.2 23
26.6 28
26.01 25

Hope you understand what I'm trying to do!
Thanks for any help!
 
Hi:
Use the following formula assuming all your numbers will be positive.

Code:
=IF(MOD(A1,1)>0.32,INT(A1)+2,INT(A1)-1)

Thanks
 
Back
Top