Solved

Excel Graph

Posted on 2014-01-07
2
405 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

688 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