Results 1 to 2 of 2

Looping

Threaded View

  1. #1
    Registered User
    Join Date
    09-13-2008
    Location
    Barrie, ON, CA
    Posts
    47

    Looping

    Hello,

    Here is a loop code that sifts threw data deleting all records that have offsetting balance amounts. My problem is that my list is is over 4000 rows long and it either becomes non responsive, or I'll mannually exit the sub and try to run it again to continue at which point it freezes again... is there somthing wrong with my code, is it inefficient?? can anyone tell me where im going wrong...

    Sub Eliminate()
    
        Range("T6").Select
        Range(Selection, Selection.End(xlDown)).Select
        Selection.Copy
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
             Range("T6").Select
              Do While ActiveCell.Value <> "End"
               If ActiveCell.Value <> 0 Then
                ActiveCell.EntireRow.Delete
                If ActiveCell.Value = 0 Then
                 ActiveCell.Offset(1, 0).Select
               End If
              End If
            Loop
    End Sub

    Any answer is a good answer

    Thanks
    Last edited by RBI; 10-15-2008 at 02:46 PM. Reason: mark as solved

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Looping through worksheets
    By terkel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-17-2008, 02:53 AM
  2. Looping data entry macro
    By jiminic in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-06-2008, 07:12 PM
  3. LOOPING appx 500 ++ million times, how to fasten this program?
    By JohnSeito in forum Excel Programming / VBA / Macros
    Replies: 37
    Last Post: 06-27-2008, 11:06 PM
  4. Script Looping and will not rename my sheet
    By realniceguy5000 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-16-2008, 05:48 PM
  5. Looping help please
    By chris100 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-05-2006, 09:11 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1