Sub Macro1(idata As String, iOrig As String) Dim iRow As Integer iRow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row Columns("F:F").Select Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove Range("F2").Select ActiveCell.FormulaR1C1 = _ "=IF(ISERROR(DATE(LEFT(RC[-1],4),MID(RC[-1],5,2),RIGHT(RC[-1],2))),"""",DATE(LEFT(RC[-1],4),MID(RC[-1],5,2),RIGHT(RC[-1],2)))" Selection.AutoFill Destination:=Range("F2:F" & iRow) Range("F2:F" & iRow).Select Selection.NumberFormat = "m/dd/yy;@" Range("F1").Select ActiveCell.FormulaR1C1 = "=RC[-1]" Columns("F:F").Select Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Columns("E:E").Select Application.CutCopyMode = False Selection.Delete Shift:=xlToLeft End Sub
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE