View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tushar Mehta[_4_] Tushar Mehta[_4_] is offline
external usenet poster
 
Posts: 66
Default Delete row if cell in column "E" has 1 or more alpha character

This is probably OK with the OP but it does delete rows where the corr. col E
cell contains a string with only numbers. For example, it deletes a row with
'5 in the corresponding col. E cell.

--
Tushar Mehta
http://www.tushar-mehta.com
Custom business solutions leveraging a multi-disciplinary approach
In Excel 2007 double-click to format may not work; right click and select
from the menu


"Rick Rothstein" wrote:

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??