RobMolyneux
New Member
- Joined
- Sep 14, 2016
- Messages
- 18
Hi, I'm sorry for the thread title, i wish i could have conveyed what i need more succinctly, but hopefully someone can assist.
I have created a report of sales values, which is updated manually by a number of parties at the end of each week within a month, but then effectively resets at the start of the next month, and I want the previous month data to be retained and used.
I've written 6 very basic macros to copy data (which changes each time the sheet is manually updated at the end of each week) into a specific location as values, based on the pressing of a "button" - one for each of 5 possible fridays within a month, and a final one for the month end date; as below...
Sub MONTH_END_PASTE()
'Copy A Range of Data
Worksheets("Report").Range("E6:E11").Copy
'PasteSpecial Values Only
Worksheets("Report").Range("Q6").PasteSpecial Paste:=xlPasteValues
'Clear Clipboard (removes "marching ants" around your original data set)
Application.CutCopyMode = False
End Sub
What I would like to do, is to add to the "Month End" code, that it also copies this data to a table within another sheet (named "Targets") but the paste location will vary, dependent on the month in question.
I have a table for each month of the coming FY in B23:M28, where column A is the summary headings for each line, and April-18 is in column B, through to Mar-19 in Column M.
I would like, when clicking on the "Month End" button, put pull the data from range E6:E11, to be copied into the current destination cells (Q6:Q11) but also into the table within the "Targets" sheet, but how do i do this so that it pastes into the correct column for the corresponding month?
If it helps to answer the question, cell D2 of the active sheet (named "Report") holds the first day of the current month (entered as DD/MM/YYYY ; showing as MMM-YY) and Row 4 of the "Target" sheet has the first day of each month (again, as DD/MM/YYYY, showing as MMM-YY format) from B4:M4
There's a chance this is all very confusing, but hopefully you'll get enough to understand the gist of what I'm after, and if you need any clarification I'll be happy to provide it as best I can.
Thanks in advance.
I have created a report of sales values, which is updated manually by a number of parties at the end of each week within a month, but then effectively resets at the start of the next month, and I want the previous month data to be retained and used.
I've written 6 very basic macros to copy data (which changes each time the sheet is manually updated at the end of each week) into a specific location as values, based on the pressing of a "button" - one for each of 5 possible fridays within a month, and a final one for the month end date; as below...
Sub MONTH_END_PASTE()
'Copy A Range of Data
Worksheets("Report").Range("E6:E11").Copy
'PasteSpecial Values Only
Worksheets("Report").Range("Q6").PasteSpecial Paste:=xlPasteValues
'Clear Clipboard (removes "marching ants" around your original data set)
Application.CutCopyMode = False
End Sub
What I would like to do, is to add to the "Month End" code, that it also copies this data to a table within another sheet (named "Targets") but the paste location will vary, dependent on the month in question.
I have a table for each month of the coming FY in B23:M28, where column A is the summary headings for each line, and April-18 is in column B, through to Mar-19 in Column M.
I would like, when clicking on the "Month End" button, put pull the data from range E6:E11, to be copied into the current destination cells (Q6:Q11) but also into the table within the "Targets" sheet, but how do i do this so that it pastes into the correct column for the corresponding month?
If it helps to answer the question, cell D2 of the active sheet (named "Report") holds the first day of the current month (entered as DD/MM/YYYY ; showing as MMM-YY) and Row 4 of the "Target" sheet has the first day of each month (again, as DD/MM/YYYY, showing as MMM-YY format) from B4:M4
There's a chance this is all very confusing, but hopefully you'll get enough to understand the gist of what I'm after, and if you need any clarification I'll be happy to provide it as best I can.
Thanks in advance.