title: Excel Macro - Copy and Paste Values and Delete Original Columns
body: <p>I will do my best to try and not sound confusing - so here goes:</p>
  
  <p>I'm creating a spreadsheet that will hash SSN and DOB once the values are provided by a user. I have formulas that add last 4 ssn, first 4 dob, hashed dob and hashed SSN into their owns columns once the full SSN and DOB are provided. However, I want to remove the columns with the provided full SSN and DOB without losing the hashed DOB and SSN, including the first 4 DOB and last 4 SSN.</p>
  
  <p>The spreadsheet format is:</p>
  
  <p><code>J               N              X                AQ
  Hashed DOB   First 4 DOB     Last 4 SSN     Full SSN Hash
  </code></p>
  
  <p>The <code>Full date of Birth</code> and <code>Full SSN</code> columns are in columns <code>Q</code> and <code>R</code>.</p>
  
  <p>Here is an old macro that I'm trying to work on to delete the original <code>Full date of Birth</code> and <code>Full SSN</code> values. I can't figure out how to get it to work on columns that are spread out rather than next to eachother.</p>
  
  <pre><code>Sub CopyAndDeleteSensData()
  
      Columns("E:H").Select
      Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
      Columns("A:D").Select
      Selection.Copy
      Columns("E:E").Select
      Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
      :=False, Transpose:=False
      Columns("A:D").Select
      Application.CutCopyMode = False
      Selection.Delete Shift:=xlToLeft
      Columns("A:D").EntireColumn.AutoFit
      Columns("J:K").Select
      Application.CutCopyMode = False
      Selection.Delete Shift:=xlToLeft
      Range("E2").Select
  
  End Sub
  </code></pre>
  
  <p>Thank you in advance for the help!</p>