Dim rng As Range
Dim rng2 As Range
Dim cl As Object
Dim lngRow As Long
Set rng = Range("A1:A" & Cells.SpecialCells(xlLastCell).Row + 1)
On Error Resume Next
For lngRow = 1 To rng.Rows.Count
ActiveSheet.Cells(lngRow, 1).Value = Split(ActiveSheet.Cells(lngRow, 1).Value, " ")(0)
On Error GoTo 0
I would like to modify the script so that when it find numbers in column A, that it does not remove the leading 0's to those numbers but leaves them intact, and still goes on with the function set out for the macro.
For instance if it finds a line in column A which has the following:
00001 BULK DESCRIPTION 20 lbs
It will simply leave it as 1.
I want it to be:
It seems to work fine if there are alpha characters, but if it's numbers, then it removes leading zeros and it should not.
Can we modify the script if possible?
Any assistance is appreciated.