title: Reference data from other rows in a worksheet
body: <p>I have a worksheet with several hundred thousand rows![</p>
  
  <p>What I am trying to do is populate the "Item" column 4 with the numerical values underneath the text values in "Raw Data" column 5. While I realize that I can just use =E8 in d2 (which is what I did for this example); however this is not a dynamic solution. </p>
  
  <p>I am looking for something that will look for a Y in "Is Chron" column 1, then count the number of repeating Ys and then count that many rows down in "Raw Data" column 5 to populate the numerical value underneath the text values.</p>
  
  <p>I have pasted the example using vertical bar delimiters.</p>
  
  <p>Would this be a job for vba, or can it be achieved with some excel formula? </p>
  
  <pre><code>Is Chron|   Line|   Chron Table|    Item|   Raw Data|
  Y|      14| HAR|        400|    14|ADM_DATE_TIME HAR|
  Y|      14| HAR|        405|    HAR|
  Y|      14| EPT|        18850|  EPT|
  Y|      14| EPT|        18851|  EPT|
  Y|      14| EPT|        10820|  EPT|
  Y|      14| EPT|        10815|  EPT|
  N|      14| EPT|            |400|
  N|      14| EPT|            |405|
  N|      14| EPT|            |18850|
  N|      14| EPT|            |18851|
  N|      14| EPT|            |10820|
  N|      14| EPT|            |10815|
  </code></pre>