AgTalk Home
AgTalk Home
Search Forums | Classifieds (1) | Skins | Language
You are logged in as a guest. ( logon | register )

Excel 2007 question
View previous thread :: View next thread
   Forums List -> Computer TalkMessage format
 
Omar
Posted 12/19/2014 20:37 (#4251947 - in reply to #4250833)
Subject: RE: Excel 2007 question


Elmira, Ontario

Well, there is this method. I don't have a loop counter or anything. The only way this will stop is when the Find function runs out of things to find. My testing worked, but just make sure you save the file before running this macro. I changed the Lookat part to Lookat:xlWhole. I just feel that is safer to not find a false positive.

For some reason, running a macro that deletes things makes me nervous!

 

Sub RemoveTotalRows()

  

    Columns("A:A").Select

  

    Do

    On Error GoTo finish

   

    Selection.Find(What:="Total", After:=ActiveCell, LookIn:=xlFormulas, _

        LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _

        MatchCase:=False, SearchFormat:=False).EntireRow.Clear

    Loop

   

finish:

    Range("a1").Select

  

End Sub

Top of the page Bottom of the page


Jump to forum :
Search this forum
Printer friendly version
E-mail a link to this thread

(Delete cookies)