Copy Multiple Selection by Date Range

Microsoft Microsoft excel 2007 (pc)
August 19, 2010 at 05:53:04
Specs: Windows XP
I'm trying to create a macro that will copy multiple selections from a sheet in one workbook to another sheet in another workbook. The selection would be based on a date range of dates in Column A of the first workbook. This date range would need to be entered as a parameter by the user...

In more detail, here's what I would like the macro to do...

1.In Sheet1 of Workbook1, User runs macro... macro asks for Start Date & End Date.
2. When date range is entered, rows in column A of Sheet1, Workbook1 containing dates within this date range are found.
3. Columns D, E, F, I, J, L, M are selected in each row where Column A date value is within the date range.
4. In Sheet1 of Workbook1, the column values of the rows found are written to the columns in Sheet1 of Workbook2. More specifically...
Column F to Column A in WorkBook2
Column D to Column B in WorkBook2
Column E to Column C in Workbook2
Column I to Column D in Workbook2
Column J to Column E in Workbook2
Column M to Column G in Workbook2
Column L to Column M in Workbook2

I hope this is defined enough to be of assistance. Any questions, please let me know.

Thanks in advance.

See More: Copy Multiple Selection by Date Range

August 19, 2010 at 06:47:36

I'm trying to create a macro

OK, so you are trying to create a macro, and you have told us what you want it to do.

What help are you asking for -
Do you want someone to write this macro for you, or do you want some suggestions as to how this macro could be structured to meet your objectives.

If you are trying to create a macro, have you written any code yet - if so, you could post it and identify what isn't working and ask for some help.

If you want someone to write it for you, that's a pretty big 'want' - Everyone who answers these posts is volunteering their time and knowledge and this is not a 5 minute task.

In addition:
... you have not identified what happens if this macro is re-run. What happens to data already copied - is it erased first and all the new data moved to its destination.

What happens when a different date range is selected - are the rows copied to the destination worksheets below the previous data.

Is data moved to new workbooks for new date ranges.

Are checks needed on the input dates to test for acceptable date ranges.

If anyone does write some code for this - are your workbooks really named "Workbook1" and "Workbook2" and what are the file extensions. Will the two workbooks be open before the macro is run, or will 'Workbook2'.xls' need to be opened.


Report •
Related Solutions

Ask Question