Create New Workbook from Existing Workbook w/ Date Range

martenian

New Member
Joined
Sep 23, 2016
Messages
5
Hi All,

I'm looking for some help writing a macro to create a new workbook from an existing workbook w/ some unique requirements.
  1. Copy data from Workbook1
  2. Create new workbook with predefined column headings and copy data from workbook1 (where column H = "Y") to the respective column in the new workbook.

Here's where it gets tricky. As you will see in the screenshots below there are two date columns in workbook1 (Start Date & End Date). I need the start date to be copied to cell A2 in the new workbook, and then pulled down all the way through the end date listed on workbook1. I have no idea how to accomplish this.
  1. I then need the data in the remaining columns to be copied down to the last row (i.e. the row with the end date)

WorkBook1:
Security IDPricePolicyRunSourceStartDateEndDatePublishToWso
LX156472130GlobalSF Pricing RunMarkit (Loans) - Mid09/16/1012/01/16Y

<tbody>
</tbody>



New WorkBook:
DatePrimary IDSourceBidAskMarkPrior Date PriceDelta
01/01/16LX156472Markit (Loans) - Mid130130130
01/02/16LX156472Markit (Loans) - Mid130130130
01/03/16LX156472Markit (Loans) - Mid130130130
01/04/16LX156472Markit (Loans) - Mid130130130
01/05/16LX156472Markit (Loans) - Mid130130130
01/06/16LX156472Markit (Loans) - Mid130130130
01/07/16LX156472Markit (Loans) - Mid130130130
01/08/16LX156472Markit (Loans) - Mid130130130
01/09/16LX156472Markit (Loans) - Mid130130130

<tbody>
</tbody>


Any help would be greatly appreciated!!!!
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
What worksheet in workbook1 holds the data?
If there are multiple lines in that worksheet, does each line get a new workbook? a new worksheet in the same workbook?
The start and end dates in your example don't match your text. Please provide a reworked example.
 
Upvote 0

Forum statistics

Threads
1,214,804
Messages
6,121,652
Members
449,045
Latest member
Marcus05

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