Skip to content

Instantly share code, notes, and snippets.

@nckltcha
Created March 19, 2012 13:36
Show Gist options
  • Select an option

  • Save nckltcha/2112429 to your computer and use it in GitHub Desktop.

Select an option

Save nckltcha/2112429 to your computer and use it in GitHub Desktop.
VBA Macros taken from Excel
Sub DoIt()
Selection = Selection.Value
End Sub
Sub datevalues()
'
' Macro2 Macro
' Macro recorded 05/03/2012 by Nick Latocha
'
'
Selection.Insert Shift:=xlToRight
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveCell.FormulaR1C1 = "=DATEVALUE(RC[1])"
ActiveCell.Select
Selection.AutoFill Destination:=ActiveCell.Range("A1:A11246")
ActiveCell.Range("A1:A11246").Select
Selection.Copy
ActiveCell.Offset(0, 1).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Selection.NumberFormat = "dd/mm/yyyy;@"
ActiveCell.Offset(0, -1).Columns("A:A").EntireColumn.Select
Selection.Delete Shift:=xlToLeft
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment