I want to clean up some data that's having trouble importing into Arc. I want to know a way to clear spaces in only the top row in excel. Sometimes there is one hidden before or after the row name and it causes Arc to import them incorrectly. It will return an invalid SQL statement when it tries to draw in Arc. I'm using ArcGIS 10.2.2.

  • If you are dealing with a lot of messy data have you seen what was called Google refine? Have a look here.
    – Hornbydd
    Nov 25, 2014 at 21:59
  • Save as CSV, then nothing is hidden and all formulas are calculated, edit in notepad (or your choice of text editor) which will do find & replace but it's just as easy to do the top line manually. After you're done import to personal geodatabase or file geodatabase format, Excel can have hiccups in ArcMap. Nov 26, 2014 at 4:42

1 Answer 1


You can use the Replace function detailed in this guide:

Remove all spaces with the Replace function

Sometimes, we want to remove all spaces between character and numbers in a range, we can use Replace function to solve it.

  1. Highlight the range that you want to remove all spaces.

  2. Click Home > Find & Select > Replace…, the Find and Replace dialog box will pop out.

  3. In the Find what box, press the space bar once, don’t input anything in the Replace with box, then click Replace All. There will be a prompt message telling you how many spaces have been removed. See screenshot:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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