ExcelPupper
Board Regular
- Joined
- Mar 2, 2020
- Messages
- 112
- Office Version
- 2019
- Platform
- Windows
Hi, just want to ask for your assistance.
I have here a table where I copy the formula to current day then paste value it to previous day.
My problem is that when I reached Saturday, I will clear all the data and manually copy the formula to Monday to start it all over again for the new week.
Kindly check the code below and my table.
I have here a table where I copy the formula to current day then paste value it to previous day.
My problem is that when I reached Saturday, I will clear all the data and manually copy the formula to Monday to start it all over again for the new week.
Kindly check the code below and my table.
VBA Code:
Sub CopyFrml()
'Copy formula to current day then paste value it to previous day
Range("H2").End(xlToLeft).Select
Range(Selection, Selection.End(xlDown)).Copy
Selection.Offset(0, 1).PasteSpecial xlPasteFormulas
Range(Selection, Selection.End(xlDown)).Copy
Selection.Offset(0, -1).PasteSpecial xlPasteValues
End Sub