View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Roger Govier Roger Govier is offline
external usenet poster
 
Posts: 2,886
Default Removing spaces in cell

Hi Tom

If you are sure it is always 2 spaces, then in another column enter
=MID(A1,3,255)
and copy down
When finished copy your new column and Paste SpecialValues back over
the original data to "fix the data".
The helper column can then be deleted.

Alternatively, if the data doesn't have other spaces within the source
cells you could use
=SUBSTITUTE(A1," ","")
and repeat as above.

--
Regards

Roger Govier


"Tom" wrote in message
oups.com...
Hello,

When importing external data into excel, I end up with 2 blank spaces
before the data. Need to remove the 2 blanks spaces for all the cells
in that column. Changed the format and tried decreasing indent,
neither worked.

Is there a formula or VBA code that would work?

Thanks,
Tom