View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Trim all but the first 5 characters in cell

Dim rng as Range, cell as Range
With Activesheet
set rng = Intersect(.usedRange,.columns(5)).Cells
End With
for each cell in rng
cell = Left(cell.Text,5)
Next

--
Regards,
Tom Ogilvy

"Annette" wrote in message
...
How would I write the trim to leave only the first five characters in a
column?