paste special with date

tlindeman

Active Member
Joined
Jun 29, 2005
Messages
313
Please supply me with the vba code for the following, if today()>05/01/11 then copy A2:A4 paste special to A2:A4, if today()>06/01/11 then copy A2:A11 paste special to A2:A11 etc.

Thank You
Tony
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
wouldn't copying/pasting special to the same range be redundant? and paste what - format/ values/ borders/ add etc. ?
 
Upvote 0
Perhaps:

Code:
If Date > DateSerial(2011, 6, 1) Then
    Range("A2:A11").Value = Range("A2:A11").Value
ElseIf Date > DateSerial(2011, 5, 1) Then
    Range("A2:A4").Value = Range("A2:A4").Value
End If
 
Upvote 0
Thank you , I need to paste special values because I have formulas I need to overwrite each month.

Tony
 
Upvote 0

Forum statistics

Threads
1,224,584
Messages
6,179,687
Members
452,938
Latest member
babeneker

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