Checking Bookings - VBA Help Needed

Nat1978

New Member
Joined
Aug 3, 2015
Messages
24
Hi Guys,

Hoping someone could help me. I'm using Excel for Mac 15.39.

I have a spreadsheet with two sheets, shown below:

1. Calendar

[TABLE="class: grid, width: 800, align: left"]
<tbody>[TR]
[TD][/TD]
[TD]23/10/17[/TD]
[TD]24/10/17[/TD]
[TD]25/10/17[/TD]
[TD]26/10/17[/TD]
[TD]27/10/17[/TD]
[TD]30/10/17[/TD]
[TD]31/10/17[/TD]
[TD]01/11/17[/TD]
[TD]02/11/17[/TD]
[TD]03/11/17[/TD]
[TD]more dates --->[/TD]
[/TR]
[TR]
[TD]John Doe[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Jane Doe[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]





This sheet has 60+ people listed with week day dates along the top.

2. Tasks

[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]Task[/TD]
[TD]Start Date[/TD]
[TD]End Date[/TD]
[TD]Content[/TD]
[TD]Status[/TD]
[TD]Assigned[/TD]
[/TR]
[TR]
[TD]P1[/TD]
[TD]24/10/17[/TD]
[TD]25/11/17[/TD]
[TD]TT[/TD]
[TD]Booked[/TD]
[TD]John[/TD]
[/TR]
[TR]
[TD]P2[/TD]
[TD]23/10/17[/TD]
[TD]30/10/17[/TD]
[TD]AD[/TD]
[TD]Booked[/TD]
[TD]Jane[/TD]
[/TR]
[TR]
[TD]P3[/TD]
[TD]26/10/17[/TD]
[TD]02/11/17[/TD]
[TD]TD[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]






This sheet has 100+ Tasks listed.

What I am trying to do:

I am trying to get the data in the Sheet called Tasks to fill cells in Sheet called Calendar like this:

[TABLE="class: grid, width: 800"]
<tbody>[TR]
[TD][/TD]
[TD]23/10/17[/TD]
[TD]24/10/17[/TD]
[TD]25/10/17[/TD]
[TD]26/10/17[/TD]
[TD]27/10/17[/TD]
[TD]30/10/17[/TD]
[TD]31/10/17[/TD]
[TD]01/11/17[/TD]
[TD]02/11/17[/TD]
[TD]more dates ---->[/TD]
[/TR]
[TR]
[TD]John Doe[/TD]
[TD][/TD]
[TD]P1
TT[/TD]
[TD]P1
TT[/TD]
[TD]P3
TD[/TD]
[TD]P3
TD[/TD]
[TD]P3
TD[/TD]
[TD]P3
TD[/TD]
[TD]P3
TD[/TD]
[TD]P3
TD[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Jane Doe[/TD]
[TD]P2
AD[/TD]
[TD]P2
AD[/TD]
[TD]P2
AD[/TD]
[TD]P2
AD[/TD]
[TD]P2
AD[/TD]
[TD]P2
AD[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Currently I am updating as needed manually on a daily basis.

Couple of things to note:

Sometimes Tasks for a single person overlap - if this is the case currently I create a new row underneath and show overlap in Tasks this way - ideally I'd want to try and do the same so for the example above....if task P3 started on the 25/10/17 it would look like this:

Also if another task was lined up to Joe e.g P4 TT 31/10/17 - 02/11/17 it would fill the first row if it was empty as shown, rather than create another row...if both rows were full however it would create another row....sorry if this sounds confusing but hopefully below shows what I mean:

[TABLE="class: grid, width: 800"]
<tbody>[TR]
[TD][/TD]
[TD]23/10/17[/TD]
[TD]24/10/17[/TD]
[TD]25/10/17[/TD]
[TD]26/10/17[/TD]
[TD]27/10/17[/TD]
[TD]30/10/17[/TD]
[TD]31/10/17[/TD]
[TD]01/11/17[/TD]
[TD]02/11/17[/TD]
[TD]more dates ---->[/TD]
[/TR]
[TR]
[TD]Joe Doe[/TD]
[TD][/TD]
[TD]P1
TT[/TD]
[TD]P1
TT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]P4
TT[/TD]
[TD]P4
TT[/TD]
[TD]P4
TT[/TD]
[TD][/TD]
[/TR]
[TR]
[TD](merged with
above cell)[/TD]
[TD][/TD]
[TD][/TD]
[TD]P3
TD[/TD]
[TD]P3
TD[/TD]
[TD]P3
TD[/TD]
[TD]P3
TD[/TD]
[TD]P3
TD[/TD]
[TD]P3
TD[/TD]
[TD]P3
TD[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Jane Doe[/TD]
[TD]P2
AD[/TD]
[TD]P2
AD[/TD]
[TD]P2
AD[/TD]
[TD]P2
AD[/TD]
[TD]P2
AD[/TD]
[TD]P2
AD[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I'm hoping someone could help me? I've done a bit of VBA in the past but I was not sure how start doing this!?!
 
Last edited:

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

Forum statistics

Threads
1,224,823
Messages
6,181,176
Members
453,021
Latest member
Justyna P

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