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.

FROM THIS
FlightStart DateEnd DateDays of WeekDept StationDept TimeArvl StationArvl TimeAircraft Type
99922-Apr-1929-Apr-191.3.5..LAS18:45LAX20:0073H
9991-May-196-May-191.34.6.LAS18:30LAX19:4573W
TO THIS
FlightDateWeekdayDept StationDept TimeArvl StationArvl TimeAircraft Type
99922-Apr-191LAS18:45LAX20:0073H
99924-Apr-193LAS18:45LAX20:0073H
99926-Apr-195LAS18:45LAX20:0073H
99929-Apr-191LAS18:45LAX20:0073H
9991-May-193LAS18:30LAX19:4573W
9992-May-194LAS18:30LAX19:4573W
9994-May-196LAS18:30LAX19:4573W
9996-May-191LAS18:30LAX19:4573W

<colgroup><col style="mso-width-source:userset;mso-width-alt:4461; width:92pt" span="9" width="122"> </colgroup><tbody>
</tbody>
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
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,214,653
Messages
6,120,751
Members
448,989
Latest member
mariah3

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