+ Reply to Thread
Results 1 to 2 of 2

Simple Loop Help Please

  1. #1
    Forum Contributor
    Join Date
    05-01-2006
    Location
    Erie, Pa USA
    MS-Off Ver
    Vista - Excel 2003
    Posts
    132

    Simple Loop Help Please

    I have a column which contains text which has either "Completed" or "Not Started". I sort by that column, then want to find the first cell containing "Not Started"

    Do While ActiveCell.Text <> "'Completed"
    ActiveCell.Offset(1).Select
    Loop

    This doesn't work - what am I doing wrong?

  2. #2
    Registered User
    Join Date
    04-21-2006
    Posts
    61

    Loop until?

    Do you need to add
    loop until ActiveCell.Text <> "'Completed" (you said you wanted the first example of "not started"... shouldn't that be at the top of the loop? i.e.

    Do While ActiveCell.Text <> "Not started"
    ActiveCell.Offset(1).Select
    Loop


    Plus you had an additional ' in front of the "completed""...

    Quote Originally Posted by HBF
    I have a column which contains text which has either "Completed" or "Not Started". I sort by that column, then want to find the first cell containing "Not Started"

    Do While ActiveCell.Text <> "'Completed"
    ActiveCell.Offset(1).Select
    Loop

    This doesn't work - what am I doing wrong?

+ Reply to Thread

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