Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 90
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
remove 1st 2 letters in each row Cathy Excel Discussion (Misc queries) 1 December 15th 09 02:01 PM
Remove letters from text string John Calder New Users to Excel 3 May 14th 08 12:53 AM
Remove dashes between letters and between letters and digits [email protected] Excel Worksheet Functions 7 March 5th 08 06:08 PM
How can I remove a space between a letters and set of numbers? connie Excel Discussion (Misc queries) 5 July 2nd 07 04:31 PM
Remove letters from a cell Steve Excel Programming 10 October 2nd 04 04:32 AM


All times are GMT +1. The time now is 06:29 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"