LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default Macro to find specific data in a cell, then delete that row on down

Sub DeleteRows()
Dim c As Range
Set c = Cells.Find(What:="ASC database on SQL Server", _
After:=Range("B1"), LookIn:=xlFormulas, LookAt:=xlPart, _
SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False)
Rows(c.Row & ":" & c.Row + 20).Delete
End Sub

Hth,
Merjet

 
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
how do i find specific data in a cell and its colocated cell data sfself Excel Worksheet Functions 4 March 27th 09 08:23 AM
Macro to delete rows containing specific data Slohcin New Users to Excel 2 December 20th 06 11:52 AM
Macro to delete specific rows above selected cell [email protected] Excel Programming 3 August 25th 06 04:14 PM
How do i create a macro to find a specific data? James Excel Programming 2 March 14th 06 07:56 AM
macro to find date format in a cell and delete that entire row vikram Excel Programming 8 April 30th 04 06:00 PM


All times are GMT +1. The time now is 11:00 PM.

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

About Us

"It's about Microsoft Excel"