Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub Delete_Non_Number_Rows()
- ' Dimension variables.
- I = 1
- Set xRng = Selection
- ' Loop once for every row in the selection.
- For xCounter = 1 To xRng.Rows.Count
- ' If it's no numeric, then...
- If Not IsNumeric(xRng.Cells(I)) Then
- ' ...delete an entire row of cells.
- xRng.Cells(I).EntireRow.Delete
- ' Otherwise...
- Else
- ' ...increment I by one so we can cycle through range.
- I = I + 1
- End If
- Next xCounter
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment