troubleshooting Question

Delete Row if not a Social Security number

Avatar of llawrenceg
llawrencegFlag for United States of America asked on
ProgrammingMicrosoft Excel
2 Comments1 Solution342 ViewsLast Modified:
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)
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros