title: Comparing Column1 to Column 2 and writing to Column3 if match
body: <p>I have an excel worksheet linked to a SQL query in column [Raw Data]. After adding a few columns with formulas to clean up the raw data, i need to find if the value in column [ProcDataQ] exists in column [ProcDataO], all columns comprise to make Table1.</p>
  
  <pre><code>ProcDataQ | ProcDataO | Stat
  --------- | --------- | ---- 
  C1234     |   C7126   | Ordered
  C8372     |   C6152   | No Order
  C7126     |   C1234   | Ordered
  </code></pre>
  
  <p>I am able to do this with the below formula but i have more than 20,000 records and it takes on or around 30 seconds to load or refresh the table and i figured i could speed this up using a little vba that I'll trigger to run on the query refresh. </p>
  
  <pre><code>=IF(AND(LEFT([@[Raw Data]],1)="q", (NOT(ISERROR(MATCH([@ProcDataQ],[ProcDataO], 0))))),"Ordered", "No Order Placed")
  </code></pre>
  
  <p>fyi, i am running excel 2010 on PC.</p>