I have this code below. I am in need of a couple of things for this to accomplish.
1) Ignore empty cells
2) process two distinct columns (H and M) and only process to the last cell that contains data in each col.
) Process across all Worksheets in the workbook.
Code: Select all
Sub PadWithFiveZeros()
Dim rng As Range
Dim cl As Range
For Each cl In Range("h2", Range("h1048576").End(xlUp))
cl.Value = Right("00000" & cl.Value, 5)
Next cl
End Sub