View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pete_UK Pete_UK is offline
external usenet poster
 
Posts: 8,856
Default remove leading spaces

You could apply it at the same time as you capitalize each cell in the
column. Post your code if you need further advice.

Pete

On Jan 24, 4:03*pm, harwookf
wrote:
Is it possible for this to happen automatically without having to click on
anything for it to work??
I already have VBA code to change the colour of cells and to capitalize
columns. Ideally I would like to just alter this to deal with the spaces.



"Pete_UK" wrote:
You can use the TRIM function to remove leading (and trailing) spaces
- in a helper column put a formula like:


=TRIM(A1)


and copy down, assuming your values are in column A - adjust to suit.
You can fix the values and then copy over the originals. Record a
macro while you do this once, and then you can replay it again next
time you want to do this.


Hope this helps.


Pete


On Jan 24, 11:24 am, harwookf
wrote:
Is there a way of automatically being able to remove leading spaces? *A
number of people work on a spreadsheet and some remove the space themselves,
but others don't.
Ideally I would like it to automatically change perhaps by using a macro.- Hide quoted text -


- Show quoted text -