Tabel values rounded to step by 0,5 ex. Value 2.6632 to 2.5 and 8,7601 to 9.0

758
1
02-02-2017 01:36 PM
JohnnyJohansson
New Contributor III

How do i tranform tabel values  values rounded to steps of 0,5? ex. Value 2.66 to 2.5 and 8,76 to 9.0 in arcgis 10?

I need them to be rounded in step by 0,5.

Thers probably some easy solution, the only thing i found is round to nth. But not quite what I'm locking for..

Always greatfull for all the help we get here!

/J

0 Kudos
1 Reply
DarrenWiens2
MVP Honored Contributor

I think you can get to it through the field calculator, Python parser, using an expression like:

round(!your_field_name!*2,0)/2.0‍‍‍

So, your examples:

2.66 * 2 = 5.32

round(5.32,0) = 5

5 / 2.0 = 2.5

8.76 * 2 = 17.52

round(17.52,0) = 18

18 / 2.0 = 9.0

0 Kudos