?
Solved

Excel Graph

Posted on 2014-01-07
2
Medium Priority
?
418 Views
Last Modified: 2014-01-08
Dear Experts -

How can I set up a graph that the range is set by the user?  For example I have a graph that has a year column say column A and then the data I want to graph say in column D.      I want to allow the user to say only graph years 2013-2025 and graph only the data in column D that relates to those years labeled in column A.    Hopefully my question make sense.
0
Comment
Question by:Michael Keith
2 Comments
 
LVL 81

Accepted Solution

by:
byundt earned 1200 total points
ID: 39764140
I suggest using dynamic named ranges as the source of the data for your charts. You can then choose the starting and ending dates for your graph.

In the attached workbook (from your other question), I created a named range Years:
=INDEX(Graphs!$A$5:$A$36,MATCH(Graphs!$O$28,Graphs!$A$5:$A$36,0)):INDEX(Graphs!$A$5:$A$36,MATCH(Graphs!$O$30,Graphs!$A$5:$A$36,0))

And a named range TotalDebt:
=OFFSET(Years,0,MATCH("Total Existing Debt",Graphs!$3:$3,0)-1)

And a named range TotalBondLevy:
=INDEX(Projections!$S$10:$S$35,MATCH(Graphs!$O$28,Projections!$A$10:$A$35,0)):INDEX(Projections!$S$10:$S$35,MATCH(Graphs!$O$30,Projections!$A$10:$A$35,0))

These named ranges depend on the values in Graphs worksheet cells O28 and O30 for the starting and ending year in each range.

I used these named ranges by selecting the series in Graphs worksheet "Revenue Graph". The series formula for the vertical columns becomes:
=SERIES("Debt",'Sample-DataQ28332928.xlsm'!Years,'Sample-DataQ28332928.xlsm'!TotalDebt,2)

And the series formula for the area series becomes:
=SERIES("Revenue",'Sample-DataQ28332928.xlsm'!Years,'Sample-DataQ28332928.xlsm'!TotalBondLevy,1)
Sample-DataQ28332928.xlsm
0
 
LVL 1

Author Closing Comment

by:Michael Keith
ID: 39765801
Perfect solution just what I was looking for.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question