Results 1 to 2 of 2

Do while loop issue

Threaded View

  1. #1
    Registered User
    Join Date
    04-29-2008
    Posts
    1

    Question Do while loop issue

    Hi, I am trying to pull out various subtotals from a list terminating with the word "End". My code finds the first instance only although both the counter and the rowpos increment correctly. I am beginning to lose the will to live resolving this
    _________________________________________________________________
    Sub Activities()
    Sheets("Report Paste").Select
    Counter = 1
    RowPos = 10
    Do While Cells(Counter, 1) <> "End"
        If Cells(Counter, 2) = "Total" Then
            Range(Cells(Counter, 1), Cells(Counter, 3)).Select
            Selection.Copy
            Sheets("Weekly Calculator").Select
            Range(Cells(RowPos, 10), Cells(RowPos, 12)).Select
            Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
            False, Transpose:=False
            RowPos = RowPos + 1
        End If
        
        Counter = Counter + 1
    Loop
    
    End Sub
    _________________________________________________________________

    Any assistance with this would be appreciated.
    Last edited by Leith Ross; 04-29-2008 at 10:57 AM.

Thread Information

Users Browsing this Thread

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

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