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

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

Forum statistics

Threads
1,214,873
Messages
6,122,029
Members
449,061
Latest member
TheRealJoaquin

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