Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Deleting rows

Post your code.

If you are deleting rows, it should not find any more values. If you are
trying to start from a certain row and only process forward (down), then you
need to put in a check for the location of the found cell and possibly alter
the search parameters prior.

Explain how it can delete all the instances of the target, yet then delete
two more rows?

--
Regards,
Tom Ogilvy

"JMay" wrote in message
news:uJG%b.13272$TT5.3326@lakeread06...
Bob:
Based on your macro I set up a scenario and gave it a try. It work
perfectly, only somehow [at the end] it goes back to the beginning of the
range and deletes two additional rows, erroneously. Can you comment/alter
code to eliminate?
TIA,


"Bob Phillips" wrote in message
...
Why didn't you say?

Dim oFound As Range
Dim firstaddress

Set oFound = Cells.Find("ADDRESS")
If Not oFound Is Nothing Then
firstaddress = oFound.Address
Do
oFound.Offset(1, 0).Resize(3, 1).EntireRow.Delete
Set oFound = Cells.FindNext(oFound)
Loop While Not oFound Is Nothing And firstaddress <

oFound.Address
End If

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"alexm999 " wrote in message
...
How do I loop it, I have the word ADDRESS in my spreadsheet showing up
about 100 times. I'd like to scan through the whole spreadsheet and
delete 3 rows after each word ADDRESS


---
Message posted from http://www.ExcelForum.com/







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
Macro for deleting rows and serialising the remaing rows Srinivasulu Bhattaram Links and Linking in Excel 1 November 13th 08 08:44 AM
Macro for deleting rows and serialising the remaing rows Srinivasulu Bhattaram Setting up and Configuration of Excel 1 November 12th 08 06:05 PM
Macro for deleting rows and serialising the remaing rows Srinivasulu Bhattaram Excel Worksheet Functions 1 November 12th 08 01:39 PM
Help!! I have problem deleting 2500 rows of filtered rows!!!! shirley_kee Excel Discussion (Misc queries) 1 January 12th 06 03:24 AM
deleting hidden rows so i can print only the rows showing?????? jenn Excel Worksheet Functions 0 October 6th 05 04:05 PM


All times are GMT +1. The time now is 10:14 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"