99.JPG
Hi I got macros from bakerman as below, the case that I found is if column AT already have prefix 0 it will double the 0 in prefix
for example before running macro = 02174634162 , after running =002174634162.
is someone know how to modify below macros , so if found prefix 0 on column AT just leave that cell alone.thx
Sub addprefix0ncheckToCodeArea()
On Error Resume Next
For Each cl In Range("AT1", Range("AT" & Rows.Count).End(xlUp))
If Left(cl.Value, 2) = Mid(Columns(64).Find(cl.Offset(, 9), , xlValues, xlWhole).Offset(, 1), 2, 2) Then
cl.Value = 0 & cl.Value
Else
cl.Value = Columns(64).Find(cl.Offset(, 9), , xlValues, xlWhole).Offset(, 1) & cl.Value
End If
Next
End Sub
is there a way to exclude the calculation if found prefix 0, or do nothing, thx
Bookmarks