Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Removing all rows that contain letters
I'm trying to remove all rows that contain letters, using a macro. I hope
this is easily possible. Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Removing all rows that contain letters
Dim rng as Range
On Error Resume Next set rng = Cells.SpecialCells(xlConstants,xlTextValues) rng.EntireRow.Delete set rng = Cells.SpecialCells(xlForulas,xlTextValues) rng.EntireRow.Delete On Error goto 0 -- Regards, Tom Ogilvy "fred" wrote in message ... I'm trying to remove all rows that contain letters, using a macro. I hope this is easily possible. Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Removing all rows that contain letters
here is a fixed version:
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 -- Regards, Tom Ogilvy "Tom Ogilvy" wrote in message ... Dim rng as Range On Error Resume Next set rng = Cells.SpecialCells(xlConstants,xlTextValues) rng.EntireRow.Delete set rng = Cells.SpecialCells(xlForulas,xlTextValues) rng.EntireRow.Delete On Error goto 0 -- Regards, Tom Ogilvy "fred" wrote in message ... I'm trying to remove all rows that contain letters, using a macro. I hope this is easily possible. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Removing up to 3 last letters, excel | Excel Discussion (Misc queries) | |||
all my top rows are now numbers, how to set it back to letters | Excel Discussion (Misc queries) | |||
How can I switch so that rows are referenced with letters, and co. | Excel Discussion (Misc queries) | |||
My rows switched to having numbers instead of letters. | New Users to Excel | |||
trouble removing rows | Excel Programming |