Limit Number in cell to 5 Digits
Public Sub ProcessData()
Dim i As Long
Dim iLastRow As Long
With ActiveSheet
iLastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
For i = 1 To iLastRow
.Cells(i, "A").Value = Val(Left$(.Cells(i, "A").Value, 5))
Next i
End With
End Sub
--
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
"bdehning" wrote in message
...
I have a Zip Code Table with numbers with 9 digits or more showing up.
How do I go about only allowing the field to show the first 5 numbers and
dropping the rest after 5?
--
Brian
|