title: Detect the last entry in a Column to search for a value within the used range
body: <p>I am trying to check if a value is in a certain range. If that value appears, the corresponding data to that enty is copied to another sheet. The trick is it has to be dynamically determined because the column size varies from input sheet to input sheet. In Java the <code>hasNext()</code> function can be used. I think that VBA's most similar function would be <code>Sheet1.Column.End(xlup)</code>. How is the best way to determine the end of a column for the test condition of a do while loop in vba?</p>
  
  <p>Pseudo example:</p>
  
  <pre><code>'This is part of a nested loop, this segment traverses the column looking for 'specified data.
  
  Do While (!Sheets(inputSheetName).SyntaxToDetermineEndOfColumn))
       If(someCell = someValue)
            Copy values from the corresponding row to fields in newSheet
       End If
       Next r        'This increments the row within the current column
  Loop
  Next c             'This increments to the next column of data
  </code></pre>