Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Remove all rows that contain letters
I'm trying to create a macro or something to remove an entire row, if any
cell in the row contains any letter.I plan to use a button to automate the process. Thank you |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Remove all rows that contain letters
Sub DeleteRowsWithText()
Dim rng As Range On Error Resume Next With ActiveSheet Set rng = .Cells.SpecialCells(xlConstants, xlTextValues) Intersect(rng.EntireRow, .Rows).Delete Set rng = .Cells.SpecialCells(xlFormulas, xlTextValues) Intersect(rng.EntireRow, .Rows).Delete End With On Error GoTo 0 End Sub Worked for me. Tested in xl2002 but should work in any version. -- Regards, Tom Ogilvy "fred" wrote in message ... I'm trying to create a macro or something to remove an entire row, if any cell in the row contains any letter.I plan to use a button to automate the process. Thank you |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
remove 1st 2 letters in each row | Excel Discussion (Misc queries) | |||
Remove letters from text string | New Users to Excel | |||
Remove dashes between letters and between letters and digits | Excel Worksheet Functions | |||
How can I remove a space between a letters and set of numbers? | Excel Discussion (Misc queries) | |||
Remove letters from a cell | Excel Programming |