Macro to copy data where date is 60 days or less than the current date

howard

Well-known Member
Joined
Jun 26, 2006
Messages
6,561
Office Version
  1. 2021
Platform
  1. Windows
I would like to copy Cols J to L onsheet1 where the dates in Col L is 60 days or less than the current data to sheet2

for e.g. if the current date is 01/03/2018 (dd/mm/yyyy) then dates 01/12/2017 and earlier to be copied to sheet2

It would be appreciated if someone could provide me with code to do this



Book1
JKL
1Referencecode no.Date Processed
2KDGE396644106/10/2017 00:00
3KDGE396644106/10/2017 00:00
4C5HB519760716/10/2017 00:00
56H53116774317/10/2017 00:00
62NHG063782018/10/2017 00:00
72NHG050783918/10/2017 00:00
82NHC147870528/02/2018 00:00
92NHC147871224/10/2017 00:00
102NHC147871324/10/2017 00:00
11KDHJ228210520/11/2017 00:00
122PHK235280424/11/2017 00:00
13KDHP414319728/02/2018 00:00
142PHC161367530/11/2017 00:00
15WJHC145369930/11/2017 00:00
16WJHC145369930/11/2017 00:00
17WJHA891372328/02/2018 00:00
18F5H3159374730/11/2017 00:00
19WJHA014385630/11/2017 00:00
Sheet1
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Thanks for the help, much appreciated
 
Upvote 0

Forum statistics

Threads
1,214,925
Messages
6,122,298
Members
449,077
Latest member
Rkmenon

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