View Single Post
  #3   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
Soo Cheon Jheong[_2_] Soo Cheon Jheong[_2_] is offline
external usenet poster
 
Posts: 46
Default How do I apply LTRIM to entire Sheet?

Hi,

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Sub TEST()

Dim CL As Range
Dim RNG As Range

Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual

On Error Resume Next
Set RNG = Cells.SpecialCells(xlConstants, xlTextValues)
For Each CL In Intersect(Selection, RNG)
CL.Value = LTrim(CL.Value)
Next
On Error GoTo 0

Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True

End Sub
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


--
Regards,
Soo Cheon Jheong
_ _
^вп^
--