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/426968-re-delete-row-if-cell-column-e-has-1-more-alpha-characters.html)

Rick Rothstein

Delete row if cell in column "E" has 1 or more alpha characters
 
Assuming you are running this code in the ActiveSheet (so that the Range is
referenced correctly), then this statement should do what you want...

Range("E5:E" & Rows.Count).SpecialCells(xlCellTypeConstants, _
xlTextValues).EntireRow.Delete

You can put it into a macro or execute it from the Immediate window.

--
Rick (MVP - Excel)


"Peruanos72" wrote in message
...
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 05:06 PM.

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