arlinsandbulte
New Member
- Joined
- Dec 21, 2017
- Messages
- 3
I've tried a bunch of tutorials and how-to's, but I keep getting errors.
Goal: set the data range of a chart based on user input.
In my example, I am charting some historical data with date on the horizontal (x) axis with a line chart.
I want the user to type in a date value (cell B1 in my example) & a Duration (cell B2 in my example).
The chart should display the data defined by the entered date range.
Based on some online tutorials, I am trying to use the NAMED RANGES and the OFFSET function to dynamically define the chart range. For example, applying Method 1 from here from the Microsoft help site.
But, despite the fact that I KNOW my named range formula is working, I get an error when I input the named range into the chart data source fields: "Excel found a problem with one or more formula references in this worksheet...."
Most of the examples and tutorials I have found only dynamically change only the *END* of the chart data range, but I am also dynamically updating the *START* of the chart data range too.
Here is the formula I am using in the named range definition:
=OFFSET(INDIRECT(CONCATENATE("E",MATCH(Plot_End_Date,Sheet1!$E:$E))),0,1,-1*Plot_Duration,1)
Here is a screenshot of my Excel Document: https://imgur.com/a/Y5gds
And here is a screenshot of the error I get: https://imgur.com/a/K6GDS
You can download the spreadsheet I am using to test this out here:
https://www.dropbox.com/s/o47cplmtiigkws0/range test.xlsx?dl=1
Thanks for any help you can provide!
Goal: set the data range of a chart based on user input.
In my example, I am charting some historical data with date on the horizontal (x) axis with a line chart.
I want the user to type in a date value (cell B1 in my example) & a Duration (cell B2 in my example).
The chart should display the data defined by the entered date range.
Based on some online tutorials, I am trying to use the NAMED RANGES and the OFFSET function to dynamically define the chart range. For example, applying Method 1 from here from the Microsoft help site.
But, despite the fact that I KNOW my named range formula is working, I get an error when I input the named range into the chart data source fields: "Excel found a problem with one or more formula references in this worksheet...."
Most of the examples and tutorials I have found only dynamically change only the *END* of the chart data range, but I am also dynamically updating the *START* of the chart data range too.
Here is the formula I am using in the named range definition:
=OFFSET(INDIRECT(CONCATENATE("E",MATCH(Plot_End_Date,Sheet1!$E:$E))),0,1,-1*Plot_Duration,1)
Here is a screenshot of my Excel Document: https://imgur.com/a/Y5gds
And here is a screenshot of the error I get: https://imgur.com/a/K6GDS
You can download the spreadsheet I am using to test this out here:
https://www.dropbox.com/s/o47cplmtiigkws0/range test.xlsx?dl=1
Thanks for any help you can provide!