View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Jeff Jeff is offline
external usenet poster
 
Posts: 921
Default Application.left VBA

Can somenone help fixing the VBA macro?
Sub trimit()
Dim rng As Range
Set target = Range("A2:H" & Range("A2").End(xlDown).Row)
Set rng1 = Range("F2:H" & Range("F2").End(xlDown).Row)
For Each cell In target
cell.Value = Trim(Application.Left(Range("target")), 10, 0
Range("rng1") = cell.Value
Next
End Sub