Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Aug 2001
    Posts
    66
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Moving down a Column.. (2000)

    How do I go down each cell in a column and test the contents of each cell as I go down, and stop when there is no more data?

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Moving down a Column.. (2000)

    If you know that every cell from the first to the last contains data, then something like this:

    <pre>Dim I As Long
    I = 0
    With Range("A1")
    Do While .Offset(I, 0).Value <> ""
    If .Offset(I, 0).Value = "Kevin" Then
    MsgBox .Offset(I, 0).Address & " contains Kevin"
    End If
    I = I + 1
    Loop
    End With
    </pre>

    Legare Coleman

  3. #3
    Star Lounger
    Join Date
    Aug 2001
    Posts
    66
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Moving down a Column.. (2000)

    Legare,

    Thanks for the prompt response. I'll try it as soon as I open the project again. I'm pretty seasoned in C++ data structures, however the syntax of VB/Excel takes time getting used to (i just started a few days ago). Thanks again.

Posting Permissions

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