How to use VBA for copy paste within a specified date/ header

nishe

New Member
Joined
Jan 20, 2016
Messages
1
I've got many formulas listed like below, but want it so that a cell containing a date in another worksheet which matches with a header in a column, copies and pastes that column as values, but leaves the other un-matching date/headers as formulas instead of values.

EX- The date on the "Import" tab in cell E11 is 02/2016
The data in the "Total" tab looks like this:

01/2016 02/2016 03/2016
208 =Formula1 =Formula1
304 =Formula2 =Formula2
523 =Formula3 =Formula3
232 =Formula4 =Formula4

(This is because I'm adding data to a tab which populates the formula of the total tab)- This will change with the date because of formulas so I need to copy and paste as values.)

So what code can I use to make it so that I can enter a new date into the cell and have a VBA which copies and pastes the cells under that date in a different worksheet (same workbook)
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

Forum statistics

Threads
1,215,480
Messages
6,125,045
Members
449,206
Latest member
Healthydogs

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top