[GIS] Field Calculator: Round UP to the nearest thousand

arcgis-10.3arcgis-desktopfield-calculatorpython-parser

I have a cost field in a table that I do field calculations on. The field contains values like:

  • 1,000
  • 2,100.00
  • 3,500.99
  • 4,900

I would like to use the field calculator to round the values up to the nearest thousand (unless the number is already rounded to the nearest thousand):

  • 1,000.00
  • 3,000.00
  • 4,000.00
  • 5,000.00

How can I do this with python in the field calculator?

Best Answer

You can use this:

-(-!cost!//1000)*1000
Related Question