title: Insert Value from One Column to a New Blank Column Based on Score Value
body: <p>I want to insert the name of a company from one column into a new blank one, only if the corresponding value in the "Score" column is equal to or less than 5. </p>
  
  <p>A simple Vlookup cannot be used because this template has to deal with potentially dynamic data, i.e. the column location of the "Score" column may change next quarter etc.</p>
  
  <p>VBA does not alert to any bugs in the code below, but when it is run nothing happens.</p>
  
  <p>Any help or guidance is greatly appreciated!</p>
  
  <pre><code>Sub MacroX()
     Dim Score_Col As Long
  
     For i = 1 To NumCols
        If Cells(1, i).Value = "SCORE" Then Score_Col = i
     Next
  
     For i = 2 To NumRows
        If Cells(i, Score_Col).Value &lt;= 5 Then Cells(i, 28).Value = Cells(i, 2).Value
     Next
  End Sub
  </code></pre>