Hi All
I have a worksheet that comes from an interface but the issue I need to trim the whole sheet .
I need text number as it is but on applying code It removes 0001223 to1223
which cause me a lot trouble for doing updating and cross matching.
Can anyone advise a solution to this as per attached .
I have a worksheet that comes from an interface but the issue I need to trim the whole sheet .
I need text number as it is but on applying code It removes 0001223 to1223
which cause me a lot trouble for doing updating and cross matching.
Can anyone advise a solution to this as per attached .
Code:
Sub trim()
Dim cell As Range
For Each cell In ActiveSheet.UsedRange.SpecialCells(xlCellTypeConstants)
cell = WorksheetFunction.trim(cell)
Next cell
End Sub