Delete Only The Rows with Numeric Value MACRO
Closed
NewbieinSF
-
13 Sep 2010 à 18:12
venkat1926 Posts 1863 Registration date Sunday 14 June 2009 Status Contributor Last seen 7 August 2021 - 15 Sep 2010 à 21:13
venkat1926 Posts 1863 Registration date Sunday 14 June 2009 Status Contributor Last seen 7 August 2021 - 15 Sep 2010 à 21:13
Related:
- Delete Only The Rows with Numeric Value MACRO
- How to delete a row in word - Guide
- Delete skype account - Guide
- Sed delete line - Guide
- Delete autofill chrome - Guide
- Does instagram delete message requests after 4 weeks - Guide
2 responses
venkat1926
Posts
1863
Registration date
Sunday 14 June 2009
Status
Contributor
Last seen
7 August 2021
811
13 Sep 2010 à 22:34
13 Sep 2010 à 22:34
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 14 June 2009
Status
Contributor
Last seen
7 August 2021
811
15 Sep 2010 à 21:13
15 Sep 2010 à 21:13
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.
15 Sep 2010 à 12:04
But this way it doesn't work.