If Mid(C.Value, 1, 8) Like "########" Then
C.NumberFormat = "@"
Select Case Len(C.Value)
Case 8
C.Value = "00" & C.Value
Case 9
C.Value = "0" & C.Value
End Select
End If
BuddieB said:Another option is to format the cell with a custom number format:
i.e. 00000000 if there are 8 digits in the account number,
though I am sure there are added benefits to formatting the cell as text that Aladin would be better able to enlighten us about.