Solved

Excel Graph

Posted on 2014-01-07
2
397 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:Apex623
2 Comments
 
LVL 81

Accepted Solution

by:
byundt earned 300 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:Apex623
ID: 39765801
Perfect solution just what I was looking for.
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

740 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