larinda4
Board Regular
- Joined
- Nov 15, 2021
- Messages
- 73
- Office Version
- 365
- Platform
- Windows
Good morning,
I'm having a hard time trying to figure out a macro that will update the yyyy-mm(+1) in a specific cell. It needs to include the ' at the beginning as that year-month is used to update the table below it.
Example: It is currently September 2022 right now. I would need the macro to select cell C2, and update it to '2022-10
I found this code below that I was thinking maybe I could alter?
Any help would be appreciated!
I'm having a hard time trying to figure out a macro that will update the yyyy-mm(+1) in a specific cell. It needs to include the ' at the beginning as that year-month is used to update the table below it.
Example: It is currently September 2022 right now. I would need the macro to select cell C2, and update it to '2022-10
I found this code below that I was thinking maybe I could alter?
VBA Code:
Sub TestDate()
Dim dtToday As String
dtToday = Format (Date, "yyyy mm")
End Sub
Any help would be appreciated!