I have a Excel file showing annual precipitation and I add it on arcmap. When I tried to check it's attribute table the field calculator is passive. I want to change all the Null value to specific number for analysis. How can I solve it please?

  • 3
    Excel data cannot be edited using ArcMap. It sounds like you may have added it to ArcMap as an XY Event Layer so from there you could Export to Shapefile or Feature Class and then use the Field Calculator.
    – PolyGeo
    Mar 22 '13 at 1:12
  • Revisiting this Question it is not clear to me whether you are asking why you cannot use the Field Calculator on an XY Event Layer or how to change nulls to numbers. If it is both then this Question appears to be too broad.
    – PolyGeo
    Apr 28 '14 at 11:55
  • I voted too broad but if Question becomes what is in the title then I think it is a duplicate of gis.stackexchange.com/questions/29146/…
    – PolyGeo
    Apr 28 '14 at 21:30

If your data is an Excel table to start with, you can do a global search and replace in Excel before importing to ArcGIS.


if you import it to a gdb you can run calcField like so

  1. open the Calculate Field tool
  2. set the input table, field name (your date field), expression type to PYTHON
  3. set the expression to

  4. put this code into the code block (update my dec 31 1981 to your desired date)

    import datetime
    def x(v):
    if v is None:
      return datetime.datetime(1981, 12, 31)
      return v

Try this method :

  1. Import your Excel sheet to ArcMAp
  2. Export the sheet to dbf
  3. Go to table properties of dbf
  4. select Definition query => click Query Builder
  5. Select the field with Null values then Click "Is" Button
  6. Click "Get Unique Values and select Null
  7. Now you can use Field Calculator to change Null.

sample : "City" IS NULL


If you want to be able to edit the file directly in ArcMap, you can also save your .xls as a .dbf before importing it.

  • 1
    Please explain how and/or that would help solve the problem described in the question. Apr 21 '13 at 10:11
  • The older versions of Excel (maybe 2003?) allowed save as.. with .dbf , but not the newer versions. I use open office Calc rather than Excel for that reason. Also there's Libre (office?) Calc that does the same. Whenever you do this, be careful about the field being either string or number (and formatted to the digits you need) because the resulting .dbf imports those fields' formats and that's always what trips me up.
    – Geocurious
    Apr 22 '13 at 1:39

I would take the following approach with the field calculator:

enter image description here

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