Hello, I have the below code that adds today's date to the 1st column, then deletes some other columns. The issue is the current date is being added to 50K lines and not just the lines that have data, which is approx 100.
How can this be fixed to where only the rows with data has the date added? Thank you for the help.
Sub Step1()
Range("A1").Select
ActiveCell.FormulaR1C1 = "Date"
Range("A2").Select
ActiveCell.FormulaR1C1 = "=TODAY()"
Range("A2").Select
Selection.Copy
Selection.PasteSpecial paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A2").Select
Application.CutCopyMode = False
Selection.Copy
Range("A3").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
ActiveSheet.paste
Range("B:B,C:C,H:H,I:I,L:L").Select
Range("L1").Activate
ActiveWindow.SmallScroll ToRight:=2
Range("B:B,C:C,H:H,I:I,L:L,M:M").Select
Range("M1").Activate
Application.CutCopyMode = False
Selection.Delete Shift:=xlToLeft
ActiveWindow.LargeScroll ToRight:=-1
Columns("A:A").ColumnWidth = 10
Range("A2").Select
End Sub
How can this be fixed to where only the rows with data has the date added? Thank you for the help.
Sub Step1()
Range("A1").Select
ActiveCell.FormulaR1C1 = "Date"
Range("A2").Select
ActiveCell.FormulaR1C1 = "=TODAY()"
Range("A2").Select
Selection.Copy
Selection.PasteSpecial paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A2").Select
Application.CutCopyMode = False
Selection.Copy
Range("A3").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
ActiveSheet.paste
Range("B:B,C:C,H:H,I:I,L:L").Select
Range("L1").Activate
ActiveWindow.SmallScroll ToRight:=2
Range("B:B,C:C,H:H,I:I,L:L,M:M").Select
Range("M1").Activate
Application.CutCopyMode = False
Selection.Delete Shift:=xlToLeft
ActiveWindow.LargeScroll ToRight:=-1
Columns("A:A").ColumnWidth = 10
Range("A2").Select
End Sub