1

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?

7

You can use this:

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.