title: VBA to merge cells in excel
body: <p>I have a excel sheet like below. Consider the sno column as Excel numbering.
  So all the columns except DateTime are merged. I want to Merge the DateTime cells and want to delete the empty records. I tried a few formulas with no success. Is this possible</p>
  
  <p>I tried below formula but its giving weird results becoz of datetime values i think.</p>
  
  <pre><code>=INDEX($A$1:$A$&lt;ENDROW&gt;,(B1-1)*2+1,1)&amp;" "&amp;INDEX($A$1:$A$&lt;ENDROW&gt;,(B1-1)*2+2,1)
  </code></pre>
  
  <p><strong>I have this:</strong></p>
  
  <pre><code>╔═════╦════════╦══════════╦═════════╦═════════════╗
  ║ sno ║ Action ║ DateTime ║ User ID ║    Name     ║
  ╠═════╬════════╬══════════╬═════════╬═════════════╣
  ║   1 ║ INSERT ║ 8-Nov-13 ║ childsk ║ Keri Childs ║
  ║   2 ║        ║ 16:06:43 ║         ║             ║
  ║   3 ║ INSERT ║ 8-Nov-13 ║ childsk ║ Keri Childs ║
  ║   4 ║        ║ 16:04:27 ║         ║             ║
  ╚═════╩════════╩══════════╩═════════╩═════════════╝
  </code></pre>
  
  <p><strong>Expected Output:</strong></p>
  
  <pre><code>╔═════╦════════╦═══════════════════╦═════════╦═════════════╗
  ║ sno ║ Action ║     DateTime      ║ User ID ║    Name     ║
  ╠═════╬════════╬═══════════════════╬═════════╬═════════════╣
  ║   1 ║ INSERT ║ 8-Nov-13 16:06:43 ║ childsk ║ Keri Childs ║
  ║   2 ║ INSERT ║ 8-Nov-13 16:04:27 ║ childsk ║ Keri Childs ║
  ╚═════╩════════╩═══════════════════╩═════════╩═════════════╝
  </code></pre>