ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Delete row if cell in column "E" has 1 or more alpha characters (https://www.excelbanter.com/excel-programming/426966-re-delete-row-if-cell-column-e-has-1-more-alpha-characters.html)

Per Jessen

Delete row if cell in column "E" has 1 or more alpha characters
 
Try this:

Sub DeleteNonNumericRows()
LastRow = Range("E" & Rows.Count).End(xlUp).Row
For r = LastRow To 4 Step -1
If Not IsNumeric(Cells(r, "E")) Then
Rows(r).Delete
End If
Next
End Sub

Hopes this helps.

---
Per

"Peruanos72" skrev i meddelelsen
...
I'm trying to delete rows of data after row 4 if the cell in column "E"
has
any alpha characters in it at all. If the cell in column "E" is all
numeric
then no action is taken on that row. Thoughts??




All times are GMT +1. The time now is 01:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com