Link to home
Start Free TrialLog in
Avatar of llawrenceg
llawrencegFlag for United States of America

asked on

Delete Row if not a Social Security number

I have page after page of data starting with Social Security  number in Column A. I need to delete the page breaks which are blank rows or rows that are not Social Security Numbers.
I am using the ASCii code to recognise the Social Security number .
Dim e As Long
Dmim f As Long

e= Range (A65536,9).End(xlUp).Row
For f = e To 3 Step -1
If Not Range("I" & f) = " & Asc("0") To "Asc("9") Then
Range("A & f & ":" "I" & f).Delete.Shift.xl(Up)

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Tommy Kinard
Tommy Kinard
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of llawrenceg

ASKER

Great Alternative