Fleiding
New Member
- Joined
- Aug 27, 2020
- Messages
- 2
- Office Version
- 365
- Platform
- Windows
I'm creating a daily revenue report which displays the revenue of that day, month to date statistics, and a few things more. I have 31 different sheets, corresponding to each day of the month. A few details need to be manually entered in the sheet called "START", which a macro copies to a few separate sheets and clearing the entered details after clicking a button. I now manually export the corresponding sheet to PDF each day, but I created a sheet called "DAILY" where I want to paste the values from each day corresponding to the date entered in "START".
I have the following macro working which will achieve this:
I'm not sure how to edit - or improve - this macro that if not the first day of the month is selected but the second day, it will copy paste data from sheet "02" (and continuing to the last day of the month). I assume there must be a better way instead of using dd/mm/yyyy, because September is already around the corner and it would be time consuming to update this every month.
Can someone steer me in the right direction? Hopefully I clearly explained myself. If not, please let me know!
I have the following macro working which will achieve this:
VBA Code:
Option Explicit
Sub Copy_Paste_Day_To_Daily()
'Copy paste the corresponding day of date in START to DAILY.
With Sheets("START")
If .AutoFilterMode Then .AutoFilterMode = False
With .Range("A9:A9")
.AutoFilter 1, 1 / 8 / 2020
End With
Sheets("01").Range("A1:K113").Copy
Sheets("DAILY").Range("A1:K113").PasteSpecial xlPasteValues
.AutoFilterMode = False
End With
End Sub
Can someone steer me in the right direction? Hopefully I clearly explained myself. If not, please let me know!