Solved

Excel Graph

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
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.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

840 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