Solved

Excel Graph

Posted on 2014-01-07
2
355 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 80

Accepted Solution

by:
byundt earned 300 total points
Comment Utility
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
Comment Utility
Perfect solution just what I was looking for.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

743 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now