Delete Only The Rows with Numeric Value MACRO
Closed
NewbieinSF
-
Sep 13, 2010 at 06:12 PM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Sep 15, 2010 at 09:13 PM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Sep 15, 2010 at 09:13 PM
Related:
- Delete Only The Rows with Numeric Value MACRO
- Delete my whatsapp account without app - Guide
- How to delete a row in a table in word - Guide
- Numeric to words in excel - Guide
- How to delete whatsapp account without phone - Guide
- Delete snapchat account permanently - Guide
2 responses
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Sep 13, 2010 at 10:34 PM
Sep 13, 2010 at 10:34 PM
the data is range A1 down
A1 is column heading
before running the macro copy the data safely in another sheet and save the file
data
XXXXXX
111111
YYYYYYY
222222
222222
222233
TRES
TEXT
they try this macro
A1 is column heading
before running the macro copy the data safely in another sheet and save the file
data
XXXXXX
111111
YYYYYYY
222222
222222
222233
TRES
TEXT
they try this macro
Sub test() Dim j As Integer, k As Integer, r As Range j = Cells(Rows.Count, "A").End(xlUp).Row For k = j To 2 Step -1 Set r = Cells(k, 1) If IsNumeric(r) Then r.EntireRow.Delete Next k
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Sep 15, 2010 at 09:13 PM
Sep 15, 2010 at 09:13 PM
you have correctly changed the line. one more line has to be changed
Set r = Cells(k, "P")
after changing now you try.
Set r = Cells(k, "P")
after changing now you try.
Sep 15, 2010 at 12:04 PM
But this way it doesn't work.