Excel VBA multiple criteria copy and paste

tomita

New Member
Joined
Feb 5, 2018
Messages
1
Hi there,
I am new to this forum I would very much appreciate it if you could help me on the following task. I have a spreadsheet of approximately 35,000 rows and I try to copy dates from columns B and C to columns D and F if they meet the following criteria:
1. Date criteria: If a date falls between a date range (e.g. 12/1/2017 to 01/31/2018) then the existing data from Columns B and C need to be pasted to columns D and F.​
2. Column A criteria: Copy dates from columns B and C to columns D and F only if there is a number in column A and the date range criteria is met.​

Thank you in advance!

Initial spreadsheetColumns D and F should have these dates after macro is run
ABCDFABCDF
123456/30/200712/26/20176/30/200712/26/2017
12/27/2017
11/27/20171/28/2018
67891/3/201811/12/20031/3/201811/12/2003
12/26/20171/31/2018
12/26/20173/31/2012
1011121/20/20181/20/2018
5/27/20041/31/2018
11/1/20051/31/2007
1314154/1/201212/31/2010
12/26/20173/31/2012
12/26/20101/31/2018
1617181/3/20181/3/2018
9/10/19981/2/2018
11/1/200511/2/2007

<tbody>
</tbody>
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Forum statistics

Threads
1,215,529
Messages
6,125,344
Members
449,219
Latest member
Smiqer

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