title: Find first and last row containing specific text
body: <p>I have a long (2,000 + rows) list of different values.  I am trying to find the first and last row for each value.  As an example (note: all data is in one column):</p>
  <pre><code>Bats
  Bats
  Bats
  Bats
  Bats
  Bats
  Fun
  Fun
  Fun
  Fun
  Bases
  Bases
  Bases
  Bases
  Bases
  Bases
  Bases
  Bases
  Bases
  Bases
  Bases
  Balls
  Balls
  Balls
  Balls
  Balls
  Balls
  Balls
  Balls
  </code></pre>
  <p>How do I find the first row (starting at the top) and last row containing each word.  &quot;Bats&quot; starts row 1, ends at row 6.  &quot;Fun&quot; starts row 7, ends at row 10.</p>
  <p>Any ideas for a quicker way to do this, other than a loop where I compare each cell to the previous, and add a row variable if they're different?</p>
  <p>Looking for how to do so in VBA.</p>