macro to copy out rows that have a start date, end date, and days of week into separate days

richardsonyyc

New Member
Joined
Apr 4, 2019
Messages
1
Hi Everyone,
New to this as a member but have referenced mrexcel.com for years. Great site and resource!

I'm trying to create a macro that will copy out rows of data based on a start date, end date, and days of week into individuals single dates. I've found ways to break out the date range but not with respect to the days of week within and am stuck. Here is a sample of what I want to convert. Any help is greatly appreciated.


<colgroup><col style="mso-width-source:userset;mso-width-alt:4461; width:92pt" span="9" width="122"> </colgroup><tbody>
[TD="class: xl67, width: 122"]FROM THIS [/TD]
[TD="width: 122"][/TD]
[TD="width: 122"][/TD]
[TD="width: 122"][/TD]
[TD="width: 122"][/TD]
[TD="width: 122"][/TD]
[TD="width: 122"][/TD]
[TD="width: 122"][/TD]
[TD="width: 122"][/TD]

[TD="class: xl65"]Flight[/TD]
[TD="class: xl65"]Start Date[/TD]
[TD="class: xl65"]End Date[/TD]
[TD="class: xl65"]Days of Week[/TD]
[TD="class: xl65"]Dept Station[/TD]
[TD="class: xl65"]Dept Time[/TD]
[TD="class: xl65"]Arvl Station[/TD]
[TD="class: xl65"]Arvl Time[/TD]
[TD="class: xl65"]Aircraft Type[/TD]

[TD="class: xl65"]999[/TD]
[TD="class: xl68"]22-Apr-19[/TD]
[TD="class: xl68"]29-Apr-19[/TD]
[TD="class: xl65"]1.3.5..[/TD]
[TD="class: xl65"]LAS[/TD]
[TD="class: xl66"]18:45[/TD]
[TD="class: xl65"]LAX[/TD]
[TD="class: xl66"]20:00[/TD]
[TD="class: xl65"]73H[/TD]

[TD="class: xl65"]999[/TD]
[TD="class: xl68"]1-May-19[/TD]
[TD="class: xl68"]6-May-19[/TD]
[TD="class: xl65"]1.34.6.[/TD]
[TD="class: xl65"]LAS[/TD]
[TD="class: xl66"]18:30[/TD]
[TD="class: xl65"]LAX[/TD]
[TD="class: xl66"]19:45[/TD]
[TD="class: xl65"]73W[/TD]

[TD="class: xl67"]TO THIS[/TD]

[TD="class: xl65"]Flight[/TD]
[TD="class: xl65"]Date[/TD]
[TD="class: xl65"]Weekday[/TD]
[TD="class: xl65"]Dept Station[/TD]
[TD="class: xl65"]Dept Time[/TD]
[TD="class: xl65"]Arvl Station[/TD]
[TD="class: xl65"]Arvl Time[/TD]
[TD="class: xl65"]Aircraft Type[/TD]

[TD="class: xl65"]999[/TD]
[TD="class: xl68"]22-Apr-19[/TD]
[TD="class: xl65"]1[/TD]
[TD="class: xl65"]LAS[/TD]
[TD="class: xl66"]18:45[/TD]
[TD="class: xl65"]LAX[/TD]
[TD="class: xl66"]20:00[/TD]
[TD="class: xl65"]73H[/TD]

[TD="class: xl65"]999[/TD]
[TD="class: xl68"]24-Apr-19[/TD]
[TD="class: xl65"]3[/TD]
[TD="class: xl65"]LAS[/TD]
[TD="class: xl66"]18:45[/TD]
[TD="class: xl65"]LAX[/TD]
[TD="class: xl66"]20:00[/TD]
[TD="class: xl65"]73H[/TD]

[TD="class: xl65"]999[/TD]
[TD="class: xl68"]26-Apr-19[/TD]
[TD="class: xl65"]5[/TD]
[TD="class: xl65"]LAS[/TD]
[TD="class: xl66"]18:45[/TD]
[TD="class: xl65"]LAX[/TD]
[TD="class: xl66"]20:00[/TD]
[TD="class: xl65"]73H[/TD]

[TD="class: xl65"]999[/TD]
[TD="class: xl68"]29-Apr-19[/TD]
[TD="class: xl65"]1[/TD]
[TD="class: xl65"]LAS[/TD]
[TD="class: xl66"]18:45[/TD]
[TD="class: xl65"]LAX[/TD]
[TD="class: xl66"]20:00[/TD]
[TD="class: xl65"]73H[/TD]

[TD="class: xl65"]999[/TD]
[TD="class: xl68"]1-May-19[/TD]
[TD="class: xl65"]3[/TD]
[TD="class: xl65"]LAS[/TD]
[TD="class: xl66"]18:30[/TD]
[TD="class: xl65"]LAX[/TD]
[TD="class: xl66"]19:45[/TD]
[TD="class: xl65"]73W[/TD]

[TD="class: xl65"]999[/TD]
[TD="class: xl68"]2-May-19[/TD]
[TD="class: xl65"]4[/TD]
[TD="class: xl65"]LAS[/TD]
[TD="class: xl66"]18:30[/TD]
[TD="class: xl65"]LAX[/TD]
[TD="class: xl66"]19:45[/TD]
[TD="class: xl65"]73W[/TD]

[TD="class: xl65"]999[/TD]
[TD="class: xl68"]4-May-19[/TD]
[TD="class: xl65"]6[/TD]
[TD="class: xl65"]LAS[/TD]
[TD="class: xl66"]18:30[/TD]
[TD="class: xl65"]LAX[/TD]
[TD="class: xl66"]19:45[/TD]
[TD="class: xl65"]73W[/TD]

[TD="class: xl65"]999[/TD]
[TD="class: xl68"]6-May-19[/TD]
[TD="class: xl65"]1[/TD]
[TD="class: xl65"]LAS[/TD]
[TD="class: xl66"]18:30[/TD]
[TD="class: xl65"]LAX[/TD]
[TD="class: xl66"]19:45[/TD]
[TD="class: xl65"]73W[/TD]

</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.
In Excel and VBA, Weekday 1 is normally Sunday. Sow 2 thruough 6 would be Monday Through Friday. If you used the fuction =WEEKDAY(4/22/2019) it would return 2.
 
Upvote 0

Forum statistics

Threads
1,223,247
Messages
6,171,004
Members
452,374
Latest member
keccles

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