A
AlanN
I have a scheduling spreadsheet where I need to schedule healthcare staff to
cover 6 floors of a longterm care center. In column A I have the floor
number assignment starting with floor 1. In column B I have each day of the
current year from 01/01/2004 to 12/31/2004 repeated for all 6 floors. As you
can imagine it's difficult working with so many rows of data. As the
scheduling person plans in smaller windows of time, I would like to employ a
simple auto-hide of date ranges that they don't need to see for their
planning purpose.
I was hoping that someone could provide me with some macro code to help me
out here:
If I could have a button, that when pressed, would present a small window
prompting the user to enter the start date and an end date that you want to
work with or have access to. The macro would then proceed to hide all rows
in the active sheet where the date that appears in column B is >= start date
and <= end date.
Example data:
Floor Date
1 1/1/2004
1 1/2/2004
1 1/3/2004
1 1/4/2004
1 1/5/2004
1 1/6/2004
1 1/7/2004
1 1/8/2004
1 1/9/2004
2 1/1/2004
2 1/2/2004
2 1/3/2004
2 1/4/2004
2 1/5/2004
2 1/6/2004
2 1/7/2004
2 1/8/2004
2 1/9/2004
If I entered start date = 1/3/2004 and end date =1/5/2005 then I would
expect to see this:
Floor Date
1 1/3/2004
1 1/4/2004
1 1/5/2004
2 1/3/2004
2 1/4/2004
2 1/5/2004
Can anyone help?
Thanks, Alan
cover 6 floors of a longterm care center. In column A I have the floor
number assignment starting with floor 1. In column B I have each day of the
current year from 01/01/2004 to 12/31/2004 repeated for all 6 floors. As you
can imagine it's difficult working with so many rows of data. As the
scheduling person plans in smaller windows of time, I would like to employ a
simple auto-hide of date ranges that they don't need to see for their
planning purpose.
I was hoping that someone could provide me with some macro code to help me
out here:
If I could have a button, that when pressed, would present a small window
prompting the user to enter the start date and an end date that you want to
work with or have access to. The macro would then proceed to hide all rows
in the active sheet where the date that appears in column B is >= start date
and <= end date.
Example data:
Floor Date
1 1/1/2004
1 1/2/2004
1 1/3/2004
1 1/4/2004
1 1/5/2004
1 1/6/2004
1 1/7/2004
1 1/8/2004
1 1/9/2004
2 1/1/2004
2 1/2/2004
2 1/3/2004
2 1/4/2004
2 1/5/2004
2 1/6/2004
2 1/7/2004
2 1/8/2004
2 1/9/2004
If I entered start date = 1/3/2004 and end date =1/5/2005 then I would
expect to see this:
Floor Date
1 1/3/2004
1 1/4/2004
1 1/5/2004
2 1/3/2004
2 1/4/2004
2 1/5/2004
Can anyone help?
Thanks, Alan