Hi

I am using Excel 2003.

I have a workbook with a raw data page, graph page and graph data page.

On the graph page there is an area for the user to select department and month ending date. The filter working is applied to the raw page data.

The graph data page is because I only want 6 months of data from the month ending...so if Sept 2010 is the month ending then only Apr to Sep 2010 data will be graphed.

The formula for the month ending month is the named range of date selected. The next month up is =DATE(YEAR(DateSelected),MONTH(DateSelected)-1,DAY(DateSelected)) and so on for 6 months.

Problems:
- I only want the month to show up if there is one but don't know how to reference the limits of the array (TimeRanges). So for instance if right now the raw data only has Apr 2009 to Sep 2010 so if Jun 2009 was selected as the month ending then only Apr to Jun 2009 should show up, not Jan 2009 as there isn't such a month
- I need to know how to reference the raw data for each of the data elements to be used in the graph based on month. So for the final month ending (let's say Sept 2010), how do I reference Sick Time value for that month (and department)?

I look forward to your assistance...thanks very much.