Need to add character before leading zero in a field
Try this small macro:
Sub xit()
For Each r In ActiveSheet.UsedRange
If IsEmpty(r) Then
Else
If Left(r.Text, 1) = "0" Then
r.Value = "x" & r.Text
End If
End If
Next
End Sub
--
Gary''s Student - gsnu200761
"Melin" wrote:
I need an automated way to add a character before a leading zero in a field.
I am importing information into excel from one software, manipulating the
information so I have only what I need and then exporting the information
into another software. We created a macro to keep the leading zero in Excel
but the software we are importing the information into does not allow leading
zeros. =( So we have to add a character to before the leading zero.
I am currently using Excel 2003. Any help would be appreciated.
|