Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2006

Tip: Looking for answers? Try searching our database.

macro to find data and select from active cell to the last row

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lost in Alabama - 24 Jan 2006 19:38 GMT
I need help creating a macro to find "ZZZZZCount" in column J, then select
the Rows from the cell just found to the end of the sheet (R65000) and
delete.  The cell location of "ZZZZZCount" will not be constant.

Thanks,

     F                      G                                    H     J
Task Code      Task ID                               Sub No.       STSLN
JGDAAAA    REPAIR AVENGER COMPOSITE PANEL    320    CHAA
JGDAAAA    REPAIR AVENGER COMPOSITE PANEL    320    CHAA
JGDAAAA    REPAIR AVENGER COMPOSITE PANEL    320    CHAA
JGDAAAA    REPAIR AVENGER COMPOSITE PANEL    320    CHAA
JGDAAAA    REPAIR AVENGER COMPOSITE PANEL    320    CHAA
JGDAAAA    REPAIR AVENGER COMPOSITE PANEL    320    CHAA
JGDAAAA    REPAIR AVENGER COMPOSITE PANEL    330    CIAA
                                                       100    ZZZZZCount
                                                       100    ZZZZZCount
                                                       100    ZZZZZCount
                                                       100    ZZZZZCount
Tom Ogilvy - 24 Jan 2006 19:48 GMT
Dim rng as Range, rng1 as Range
set rng = columns(10).find("ZZZZZCount", After:=Range("J1"), _
      Lookat:=xlPart)
if not rng is nothing then
  set rng1 = Range(rng,cells(rows.count,"J")).EntireRow
  rng1.Delete
end if

Signature

Regards,
Tom Ogilvy

> I need help creating a macro to find "ZZZZZCount" in column J, then select
> the Rows from the cell just found to the end of the sheet (R65000) and
[quoted text clipped - 15 lines]
>                                                 100 ZZZZZCount
>                                                 100 ZZZZZCount
Lost in Alabama - 24 Jan 2006 20:08 GMT
Thank you so much for your speedy response...I'll give it a try.

> Dim rng as Range, rng1 as Range
> set rng = columns(10).find("ZZZZZCount", After:=Range("J1"), _
[quoted text clipped - 23 lines]
> >                                                 100 ZZZZZCount
> >                                                 100 ZZZZZCount
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.