Re: Excel Macro Comparison & Cell Highlighting

From: Rob van Gelder (newsgroups_at_nojunkmail-vangelder.co.nz)
Date: 03/17/04


Date: Wed, 17 Mar 2004 20:49:17 +1300

Check my website for "Hours affected by Dates"
For a two date ranges, it will tell you how much time overlaps.

This, combined with conditional formatting, will do what you're after.

-- 
Rob van Gelder - http://www.vangelder.co.nz/excel
"Triscuit" <Brian@BrianOwen.Com> wrote in message
news:ca7b2db0.0403162030.31f93c77@posting.google.com...
> Greetings,
>
>      I'm undertaking a personal project to help out my team at work
> and save a lot of hours each week.  This project involves loading data
> from a file that has a set structure, building a data *** listing
> all agents and the week involved, highlighting their schedule on a
> grid, deciding on an appropiate match for manager based on their
> schedule, then determining if a team change is necessary or if they
> should remain on the same team.  Yes, quite an undertaking but I'm
> going to work on it in steps.  I would first like to develop a simple
> macro to show the grid.
>
> Data from file would show:
>
> Brian
> Sunday DATE 8:00AM-5:00PM
> Monday DATE 9:00AM-6:00PM
> Tuesday DATE 10:00AM-7:00PM
> Wednesday DATE 11:00AM-8:00PM
> Thursday DATE 12:00PM-9:00PM
> Friday DATE 1:00PM-10:00PM
> Saturday DATE 2:00PM-1:00PM
>
> Columns E:GN are broken into 15 minute intervals beginning at
> midnight.
> 0:00 0:15 0:30 0:45 1:00 1:15
>
> An example of the output is below:
>
> I am trying to have it highlight all cells that fall within the
> schedule for each day listed.  It would look like this when completed.
> Col A  Col B  Col C  Col D  Col E
> Brian  Date   Hours  Blank  *Grid* ( This would be solid black if
> within the range. )
>
> At this point I am just trying to develop a way to loop through each
> column and runnnig a comparison for >= the start time and <= the end
> time.  I found several ways of looping through columns, but could not
> resolve the "Range not defined" errors I kept receiving.
>
> Any and all help is appreciated.  I'm not asking for the final code,
> but just a kickstart to get me going.  I realize this project is
> greatly beyond my current abilities, but I will learn as I progress
> and hope to be able to share how well this works for us when
> completed.
>
> Thanks,
>
> Brian