Forum Discussion
cinnamonster8765
Mar 23, 2025Copper Contributor
VBA code to copy data to another sheet based on date range
Hello! I am working on tracking spending entries for my budget and am new to VBA coding so I'm not understanding everything I'm seeing online for this. I was to enter in the details for the expense (...
HansVogelaar
Mar 24, 2025MVP
See if this gets you started.
Dim d As Date
Dim m As String
Dim w As Worksheet
' D2 is the cell in which you enter the date
d = Range("D2").Value
' Get the full name of the month
m = MonthName(d)
' Refer to the worksheet for that month
Set w= Worksheets(m)
' Copy data to w below
...