title: Excel VBA Replace Text with Two Arrays
body: <p>I would like to replace the values in column A:A using arrays:</p>
  
  <pre><code>Dim aValueNew() As String
  Dim aValueOld() As String
  
  aValueNew = Split("ABC,DEF,GHI", ",")
  aValueOld = Split("123,456,789", ",")
  </code></pre>
  
  <p>123 needs to be replaced by ABC, 456 by DEF and so forth.</p>
  
  <p>What is the most efficient way of doing this? I am struggling on how to include the Replace function in a loop and your help would be appreciated. Something like:</p>
  
  <pre><code>For i = 0 to i = 2
  Range("A:A").Replace What:= aValueOld(i), Replacement:=aValueNew(i), LookAt:=xlWhole, SearchOrder:=xlByRows, MatchCase:=False
  </code></pre>