title: Unable to search and replace the values using column headers
body: <p>I'm trying to create a vba script that will search for the <strong><em>_</em></strong> in all the cells fallen under <code>Crude Items</code> column. However, when it finds one, it will split the values from <strong><em>_</em></strong> and place the rest in corresponding cells fallen under <code>Refined Ones</code> column.</p>
  
  <p>I've tried with the following which is doing the job flawlessly but I wish to search and replace the values using column headers:</p>
  
  <pre><code>Sub CopyAndReplace()
      Dim cel As Range
  
      For Each cel In Range("A2:A" &amp; Cells(Rows.Count, 1).End(xlUp).row)
          If cel.value &lt;&gt; "" Then
              Sheets("Sheet1").Range(cel(1, 3).Address) = Split(cel, "_")(1)
          End If
      Next cel
  End Sub
  </code></pre>
  
  <p>To let you visualize how the sheet might look like:</p>
  
  <p><a href="https://i.stack.imgur.com/A2hJn.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/A2hJn.jpg" alt="enter image description here"></a></p>
  
  <p><strong><em>How can I search and replace the values using column headers?</em></strong></p>