Problem with calendar planner date ranges
I'm writing an Excel 2003 macro to generate a calendar planner with
coloured worksheet cells forming horizontal bars that show where a
project falls within the year.
However I can't seem to get the logic right to determine whether a
project's date range falls into any given week's column.
Here's a description of what I have:
Column 1 is a list of projects
Column 2 contains the project start dates (not necessarily Sunday
week-ending dates)
Column 3 contains project end dates (not necessarily Sunday week-ending
dates)
Columns 4 to 55 contain the year's 52 Sunday week-ending dates in the
first row and the cells below these are to be coloured if the project's
date range falls into this week. I want the cell shaded if any part of
the project's date range falls into this week.
Can anyone supply me with the comparisons I need to make in order to
determine if a project's date range overlaps the weekly range for a
column on the planner? Any help would be appreciated since my recent
attempts don't seem to pick the right cells. Thanks very much.
|