title: Sparse matrix creation using vbscript
body: <p>Suppose I have an Array={A,B,Y,X}. Now I do have an Excel sheet which can have dynamic number of columns and Rows.Say as an example below :</p>
  
  <p><em><strong>Input:</em></strong></p>
  
  <pre><code>ColA   ColB   ColC  ....
  
   T      P      Y    ....
   C      Y      D    ....
   B      A      M    ....
   Z      R      X    ....
  </code></pre>
  
  <p><em><strong>OutPut:</em></strong></p>
  
  <pre><code>ColA   ColB   ColC  ....
  
   -      -      Y    ....
   -      Y      -    ....
   B      A      -    ....
   -      -      X    ....
  </code></pre>
  
  <p>Where all the columns will have only the Array values,if any other values are found they are required to be replaced by <strong><em>"-"</em></strong></p>
  
  <p>Is there any faster process to do these using VBscript except comparatively slow looping technique?</p>
  
  <p>Thanks,</p>