title: VBscript to compare contents of some of the columns in two excel sheets for a given row
body: <p>I am new to VBscripting so please bear with me. I have two sheets which represents an old database and a new database with following structure</p>
  
  <pre><code>A          B(key)      C       D      E       F
  </code></pre>
  
  <p>837 |   15287RI0300002 | Individual | SelectRI | Direct | New Plan</p>
  
  <pre><code>A          B(key)      C      D      E       F      G      H
  </code></pre>
  
  <p>837 |   15287RI0300002 | Individual | Rating1 | Rating2 | SelectRI | Direct | New Plan</p>
  
  <p>I have to compare the contents of a row according to the key and highlight the differences. Now the problem is that columns are not ordered. Thus I need a mapping from one sheet to another.</p>
  
  <p>Can anyone help me with a vbscript ? Please try to give a general solution as I have multiple worksheets in the workbook. </p>
  
  <p>P.S. </p>
  
  <ol>
  <li>Rows are not sorted</li>
  <li>The sheets are in separate workbook</li>
  <li>It is not necessary that key in old sheet always exist in new sheet.</li>
  </ol>