title: Excel Macro to concatenate cells and shift over
body: <p>I want to be able to select any number of cells (all on the same row), and run a macro that will concatenate all the highlighted cells, then shift all of the remaining cells over.</p>
  
  <p>My description might not be clear - hopefully this makes more sense:</p>
  
  <p>In the example below, I have data in columns 1 to 8.
  I would highlight the cells in colums 1 to 3, run the macro, and have the values in the highlighted cells merged to the left (with spaces between), and have the remaining cells shifted over.</p>
  
  <p><strong>BEFORE</strong>          </p>
  
  <pre><code>Column1 Column2 Column3 Column4 Column5 Column6 Column7 Column8
  A       B       C       D       E       F       G       H
  </code></pre>
  
  <p><strong>AFTER</strong></p>
  
  <pre><code>Column1 Column2 Column3 Column4 Column5 Column6 Column7 Column8
  A B C   D       E       F       G       H
  </code></pre>
  
  <p>Is this possible to do with a macro (that I'd execute via keyboard shortcut)? I've got a general understanding of excel and vba macros, but I'm sadly not good enough to know if this is practical or possible.</p>
  
  <p>I've found some macros that concatenate cells data, but not based on highlighted cells.  Any advice would be appreciated. Thank you.</p>