Hi ,
The dynamic named range which is more important is the data range , since your X-axis quarters , in row 2 , have already been filled in till 1Q2014 ; you can even have the row filled in for another 5 years , if you wish.
So ,we should extend the X-axis as far as the data , and not the other way around.
So , the named range for the X-axis ( DatebyQuarter ) , uses the formula :
=OFFSET(Sheet1!$K$2,0,3,1,COLUMNS(Real_GDP_by_Expenditure_in_SGD_mil))
which says that we start from $K$2 , offset this by 3 columns so that the X-axis actually starts from N2. The number of columns in the X-axis is just the number of columns in the named range for the data i.e. Real_GDP_by_Expenditure_in_SGD_mil.
The data named range has the formula :
=OFFSET(Sheet1!$K$4,0,3,1,COUNTA(Sheet1!$4:$4)-1)
which says we start by offsetting the base reference of K4 by 3 columns , to start from N4. How many columns do we go up to ? We take the result of the COUNTA function over row 4 ; this returns the number of non-blank columns in this row , and since we have data in columns N through AF , and also in column K , we need to subtract 1 ; instead of the COUNTA function , if you use the COUNT function , which counts only numeric data , then you need not subtract 1 , since the COUNT function will not count the text in column K.
Narayan