Forum

Notifications
Clear all

how to have round up to 0.5

7 Posts
2 Users
0 Reactions
149 Views
(@ayemu7)
Posts: 197
Reputable Member
Topic starter
 

Hi Team,

I just want to round up (or) round down to nearest 0.5.

2.25 to 2.5

2.80 to 3 

2.5 to 2.5

etc.

Please let me know for the formula.

thank you.

Regards,

Aye

 
Posted : 10/07/2021 12:38 am
(@catalinb)
Posts: 1937
Member Admin
 

Try:

=CEILING(2.8 , 3)

=CEILING(2.25, 2.5)

 
Posted : 10/07/2021 3:12 pm
(@ayemu7)
Posts: 197
Reputable Member
Topic starter
 

Thanks for reply, Catalin,

Please see attached for my base figures and expected result. I just want a formula to work for all scenarios.

thank you.

Regards,

Aye

 
Posted : 12/07/2021 6:46 pm
(@catalinb)
Posts: 1937
Member Admin
 

You can try this:

=INT(A2)+IF(A2-INT(A2)<0.25,0,IF(A2-INT(A2)<0.75,0.5,1))

 
Posted : 12/07/2021 11:23 pm
(@ayemu7)
Posts: 197
Reputable Member
Topic starter
 

Thanks, Catalin,

It works with ABS.

Much Appreciated.

Regards,

Aye

 
Posted : 13/07/2021 12:50 am
(@catalinb)
Posts: 1937
Member Admin
 

No idea what you mean with ABS, but updated the formula, see above the part in red.

 
Posted : 13/07/2021 1:01 am
(@ayemu7)
Posts: 197
Reputable Member
Topic starter
 

Thanks, Catalin.

the one you updated was better. I used 
ABS(A2)-TRUNC(A2) and it is longer.

Thank you.

Regards,

Aye

 
Posted : 13/07/2021 9:46 pm
Share: