title: Loop through range in column B and setting index-match formula in column E based on value in column B
body: <p>Newbie with VBA here.
  I need help in setting up a VBA command that will loop through range in column B and sets an index-match formula in column E based on value in column B.</p>
  
  <p>I tried editing commands from other posts but I can't seem to find out how it works, based on this link <a href="https://stackoverflow.com/questions/6647151/excel-vba-loop-through-range-and-set-formula-in-each-cell">Excel VBA - Loop through range and set formula in each cell</a></p>
  
  <p>The index-match formula I need basically matches the ID numbers with names based on a database in another sheet. I currently using fixed index-match functions in the sheet but this screws up filter/sorting of entries. I've used another macro that clears contents of cells the return blanks - but it takes ages to run through the sheet.</p>
  
  <p>Heres the formula I need in a cell in column E if cell in column B is between 1 and 450.</p>
  
  <pre><code>=IF($B49="","",INDEX(NAMES,MATCH($B49,ID,0)))
  </code></pre>
  
  <p>Thanks in advance.</p>