I am trying to write a macro to format a calendar. The macro I have written finds each day and creates a dynamic range that includes every column that is in that day. The people who pull the calendar reports can pull anywhere from 1 to 7 days worth of data. I'm trying to format the ranges so that each day has a different background color to help make it easier to seperate the days. My problem is: how do I write a macro that will format each day when I don't know how many days (ranges) there will be? If I write a macro that will include 7 ranges, it errors out if the calendar has less than 7 days.

Any help would be greatly appreciated!

Thanks

Jen