Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003
    Posts
    311

    Unanswered: Selecting the next row :

    if my vendor is Joe, i would like to keep selecting the next row as long as its still joe, Im having a problem with this part :

    Range(Selection, Selection(xlDown)).Select

    Heres ma codage :
    Do While Selection.Value <> vbEmpty
    If Trim(Selection.Value) = "Joe" Then
    Do While Trim(Selection.Value) = "Joe"
    Range(Selection, Selection(xlDown)).Select
    Loop
    Else
    Selection.Offset(1, 0).Select
    End If
    Loop

  2. #2
    Join Date
    Oct 2003
    Posts
    1,091
    If you are always checking the same column, then try this:

    Range(ActiveCell, ActiveCell.End(xlDown)).Select

    Or maybe a better way is to use something like this:

    ActiveCell.Offset(1, 0).Select

    Just a thought (I haven't tested these).
    old, slow, and confused
    but at least I'm inconsistent!

    Rich
    (retired Excel 2003 user, 3/28/2008)

    How to ask a question on forums

Posting Permissions

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