Created
April 12, 2017 18:36
-
-
Save gtaing1/aecba7fc7bae580dff31bc0b62b48fb0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Sub DateValueConvert() | |
| ' | |
| ' DateValueConvert Macro | |
| ' | |
| Application.ScreenUpdating = False | |
| Dim lastrow As Long | |
| lastrow = ActiveSheet.Cells(Rows.Count, "B").End(xlUp).Row | |
| Selection.EntireColumn.Insert , CopyOrigin:=xlFormatFromLeftOrAbove | |
| Range("A2:A" & lastrow).Formula = "=DATEVALUE(RC[1])" | |
| 'ActiveCell.FormulaR1C1 = "=DATEVALUE(RC[1])" | |
| 'ActiveCell.Select | |
| 'Good Below - fix range? - fills the column w/ formula | |
| 'Selection.AutoFill Destination:=ActiveCell.Range("A1:A3595") | |
| 'Stackoverflow copy - works | |
| 'Range(Selection, Selection.End(xlDown)).Select | |
| 'Selection.FillDown | |
| 'selects and copys columns for da paste | |
| ActiveCell.Range("A1:A" & lastrow).Select | |
| Selection.Copy | |
| ActiveCell.Offset(0, 1).Range("A1").Select | |
| Selection.PasteSpecial Paste:=xlPasteValues | |
| 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