Hi,
I have a worksheet with a dynamic chart. I used the named ranges below to do this. There is one problem however with my data. Since the dates are stock data, there are no weekend or holiday dates.
If a StartDate or StopDate is entered for which there is no corresponding date, an error is returned. I think that I have an idea that could work to get around this but I don't know how to implment it.
The idea is that for a StartDate entered that is before the first date or on a weekend or holiday, go to the next available date down the column.
For a StopDate entered that is after the last date or on a weekend or holiday, go to the next available date up the column.
The data are entered in chronologically ascending order with the earliest date in cell A2 but it would be great if the formula worked for dates decending chronologically as well.
Named ranges:
Does anyone have an idea on how to implement this?
Thanks,
Art
I have a worksheet with a dynamic chart. I used the named ranges below to do this. There is one problem however with my data. Since the dates are stock data, there are no weekend or holiday dates.
If a StartDate or StopDate is entered for which there is no corresponding date, an error is returned. I think that I have an idea that could work to get around this but I don't know how to implment it.
The idea is that for a StartDate entered that is before the first date or on a weekend or holiday, go to the next available date down the column.
For a StopDate entered that is after the last date or on a weekend or holiday, go to the next available date up the column.
The data are entered in chronologically ascending order with the earliest date in cell A2 but it would be great if the formula worked for dates decending chronologically as well.
Named ranges:
Code:
X values= OFFSET(Chart!$A$2,MATCH(StartDate,ChartDates,0)-1,0,MATCH(EndDate,ChartDates,0)-MATCH(StartDate,ChartDates,0)+1,1)
Y values= OFFSET(Chart!XValues,0,1)
StartDate= Chart!$F$18
EndDate= Chart!$I$18
ChartDates= =Table1[Date]
Does anyone have an idea on how to implement this?
Thanks,
Art