Code:
Columns("U:U").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("U1").Value = "Data"
Range("U2").Select
ActiveCell.FormulaR1C1 = "=DATE(Month(TODAY())&Date(TODAY()-20)& &LOW&L2&_INV&S2"
Selection.AutoFill Destination:=Range("U2:U" & lastrow)
Range("U2:U" & lastrow).Select
Selection.Copy
Range("U2:U" & lastrow).Select
ActiveCell.PasteSpecial
For now. I have that code for getting data in U column.
I am trying to use date today formula to get date 20 days earlier. Then I am trying to copy whole row and paste in same column in order to remove formulas. However, I am getting run-time error '1004';
Is there any way to solve this problem?
Thank you!