title: excel vba - query on a spreadsheet
body: <p>if i have these 2 tables:</p>
  
  <p><img src="https://i.stack.imgur.com/e2t9O.jpg" alt="source"></p>
  
  <p><img src="https://i.stack.imgur.com/siprc.jpg" alt="target"></p>
  
  <p><img src="https://i.stack.imgur.com/N20A0.jpg" alt="sql"></p>
  
  <p><img src="https://i.stack.imgur.com/FsrtV.jpg" alt="result"></p>
  
  <p>is there some sort of excel vba code (using ADO) that could acheive these desired results which could utilise any query i put in the SQL sheet? 
  <img src="https://i.stack.imgur.com/9LKqP.jpg" alt="progress"></p>