Deleting Rows that Contain Numbers

Joined
Aug 24, 2006
Messages
1
Reaction score
0
How do I delete all rows that contain a numeric value in column A using a macro?

Thanks!
 
Joined
Jun 14, 2006
Messages
27
Reaction score
0
This may help


Sub RemvNumRows()
'
' RemvNumRows Macro

Dim chk As Double
Dim rownum As Double

ActiveCell.SpecialCells(xlLastCell).Select
rownum = ActiveCell.Row
Range("A1").Select
For chk = 1 To rownum
If IsNumeric(ActiveCell.Value) And ActiveCell.Value > 0 _
Then Rows(ActiveCell.Row).Delete _
Else: ActiveCell.Offset(1, 0).Select
Next

End Sub

regards

KenS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top