SlideShare a Scribd company logo
Dynamic Chart with Dropdown List ControlFebruary 18, 2011
OverviewWe will create a chart in Microsoft Excel that updates automatically based on a selection from an in-cell dropdown listThis chart will function based on quarterly figures as its data sourceThe main purpose is to show users the dynamic functionality of Microsoft Excel without using macrosCopyright © 2011 Techronology.  All rights reserved.
Quick GlanceThe componentsDropdown selection listCategories and dataDynamic chartThe ideaTo be able to change the chart's data source based a user's selectionAgain, we will not show you how to create the dropdown list itself, which is covered in a separate lessonCopyright © 2011 Techronology.  All rights reserved.
RequirementsMicrosoft Excel 2007You may be able to apply the instructions in this tutorial to other versions of Microsoft ExcelOptionalCheck out the tutorials below on creating dropdown lists in Microsoft Excel(We will not cover the creation of dropdown lists in this tutorial)Copyright © 2011 Techronology.  All rights reserved.Tutorial Linkshttp://www.slideshare.net/techron/incell-interactivity-dropdown-box-in-excelhttp://www.techronology.com/index.php?pageID=007002&lessonID=excel0001&lessonType=pres
Get the Data ReadyThis data refers to the amount of money spent on business supplies and stationary for a particular businessBelow is the data you should use in this lessonCopyright © 2011 Techronology.  All rights reserved.We have our data organized in cells D5 to H8, as shown below
Enter the DataEnter the data (in cells D5 to H8) for your chart using the same numbers as belowCopyright © 2011 Techronology.  All rights reserved.
Create the In-cell Dropdown ListIn cell B6, create an in-cell dropdown list with four choices1st  Quarter2nd Quarter3rd Quarter4th QuarterCopyright © 2011 Techronology.  All rights reserved.
Select Your Data and Prepare to Create ChartCopyright © 2011 Techronology.  All rights reserved.11Select cells D5 to E8, which will serve as your initial data for your chartClick on the Insertmenu22
Create a Standard Pie ChartClick on the Pie iconClick on the first pie icon in the 2-D Pie sectionCopyright © 2011 Techronology.  All rights reserved.
Chart DisplayYou can move the chart around, resize it, etc., but it is time to make the chart more dynamicNow that the chart is created, let's make some named ranges that will work with the chartCopyright © 2011 Techronology.  All rights reserved.
Create the Named Ranges for First Two QuartersCopyright © 2011 Techronology.  All rights reserved.11Select cells E6 to E8Type qtrData1 in the Name Box and press EnterSelect cells F6 to F8Type qtrData2 in the Name Box and press EnterWe cover named ranges in a previous tutorial, which is listed on the Requirements page in the beginning of this tutorial22
Finish Creating the Named RangesCopyright © 2011 Techronology.  All rights reserved.11Select cells G6 to G8Type qtrData3 in the Name Box and press EnterSelect cells H6 to H8Type qtrData4 in the Name Box and press Enter22
Test the Dropdown ListWe now want to supply a number based on the user's selectionBelow are the index values we want to use for the dropdown list1st Quarter = 12nd Quarter = 23rd Quarter = 34th Quarter = 4So, when a user selects 3rd Quarter, for example, the value 3 should be appliedCopyright © 2011 Techronology.  All rights reserved.
Match Up Your ChoiceType the formula shown above in cell B8 and press EnterThe MATCH function searches for a specified item in a range and then returns the relative position of that item in the rangeIn our case, the range is {"1st Quarter","2nd Quarter","3rd Quarter","4th Quarter"}Copyright © 2011 Techronology.  All rights reserved.
Our Match Formula BreakdownCopyright © 2011 Techronology.  All rights reserved.=MATCH($B$6,{"1st Quarter","2nd Quarter","3rd Quarter","4th Quarter"},0)This is the value in cell B6 we want to lookupThese are the range of values to check B6 againstThe zero value in MATCH looks for an exact matchThe final result should be 1, 2, 3, or 4 in cell B6If a match cannot be found, an error is displayedOur dropdown list should only allow the values listed in the match range; therefore, an error should not occur
Creating the Series Names from User SelectionsWe can now append the number produced in B6 to the text "qtrData"For example, if the user selects "2nd Quarter" then B6 will equal 2 and the text "qtrData" will become "qtrData2"Below are the text values that we want to create based on the user selection1st Quarter = "qtrData1"2nd Quarter = "qtrData2"3rd Quarter = "qtrData3"4th Quarter = "qtrData4"Copyright © 2011 Techronology.  All rights reserved.
Test the Series Text NameIn cell B9, enter the follow formula (including the quotations)…="qtrData"&B8…which will produce qrtData1, qrtData2, qrtData3, or qrtData4Copyright © 2011 Techronology.  All rights reserved.Remember, cell B8 is the same as…=MATCH($B$6,{"1st Quarter","2nd Quarter","3rd Quarter","4th Quarter"},0)
Finalize Series NameIn cell B10, combine cell B8 and B9 using the following formula…="qtrData"&MATCH($B$6,{"1st Quarter","2nd Quarter","3rd Quarter","4th Quarter"},0)This will become our master named range for the chart seriesCopyright © 2011 Techronology.  All rights reserved.
Get the Formula for the Series NameCopyright © 2011 Techronology.  All rights reserved.11Click on cell B10Press function key 2 (F2) to go into edit moreSelect all the text, including the equal signPress Ctrl-C to copy the formulaOr…Select and copy the formula from the formula toolbar22
Create the Series Named RangeCopyright © 2011 Techronology.  All rights reserved.11Click Formulas from the menuClick Define Name from the Formulas ribbonType seriesData as the NamePaste in the formula you copied from cell B10 to the Refers to boxPress Enter or click OKYou may need to try this twice or type in the formula directly to get use to the procedure22
Make the New Range Name an Indirect RangeOpen the Name Manager by pressing Ctrl-F3 or by clicking Name Manager from the Formulas ribbon (see previous page)Click on seriesDataIn the Refers to box, enclose everything in parenthesisBefore the first parenthesis, type INDIRECT See the complete formula belowCopyright © 2011 Techronology.  All rights reserved.=INDIRECT("qtrData"&MATCH(Sheet1!$B$6,{"1st Quarter","2nd Quarter","3rd Quarter","4th Quarter"},0))
INDIRECT Function NoteINDIRECT returns the reference specified by a text string. References are immediately evaluated to display their contents. Use INDIRECT when you want to change the reference to a cell within a formula without changing the formula itself.Copyright © 2011 Techronology.  All rights reserved.
Apply Your New Range Name to the ChartRight-click on a white area on the chart to view the shortcut menuClick Select Data from the shortcut menuYou can also click on the chart, select Design from Chart Tools, and click on the Select Data iconCopyright © 2011 Techronology.  All rights reserved.
Create New Data SourceCopyright © 2011 Techronology.  All rights reserved.11Click on 1st Qtr and then click the Edit optionUnder Edit Series, type Sheet1!seriesData in the Series values boxPress Enter or click OKBasically, what you are doing is typing the name of your sheet, the exclamation point, and the named rangeIf your sheet's name is not "Sheet1" replace "Sheet1" with the name of your sheet22
Test Your ChartNow when you select an option from the dropdown, the chart will update automatically according to your selectionOn the other hand, the series name or title will not change because you did not create a dynamic range name for them yetYou really do not need to unless you plan on displaying a chart or series titleSimply click on the chart title and press deleteCopyright © 2011 Techronology.  All rights reserved.
End NotesYou can now delete the contents of the test cells (B8, B9, and B10)This technique can work with almost any kind of chartOnce you get really good, you can create charts that automatically adjust to the size of a rangeYou can get the supporting Microsoft Excel file from the following site:http://www.techronology.com/products.php?prodID=less002Copyright © 2011 Techronology.  All rights reserved.
www.techronology.com
Ad

More Related Content

What's hot (20)

Excel 2007
Excel 2007Excel 2007
Excel 2007
Usha Makvana
 
Getting Started with MS Access and Pivot Tables
Getting Started with MS Access and Pivot TablesGetting Started with MS Access and Pivot Tables
Getting Started with MS Access and Pivot Tables
Parth Acharya
 
Excel chapter-4
Excel chapter-4Excel chapter-4
Excel chapter-4
OpenCastLabs Consulting
 
Basics of Ms Excel Office Tool
Basics of Ms Excel Office ToolBasics of Ms Excel Office Tool
Basics of Ms Excel Office Tool
Subodh Shahare(सुबोध शहारे)
 
Excel Graphs Charts
Excel Graphs ChartsExcel Graphs Charts
Excel Graphs Charts
simply_coool
 
Excel Intermediate
Excel IntermediateExcel Intermediate
Excel Intermediate
simply_coool
 
Pivot Table & Chart_Parakramesh Jaroli_Pacific University
Pivot Table & Chart_Parakramesh Jaroli_Pacific UniversityPivot Table & Chart_Parakramesh Jaroli_Pacific University
Pivot Table & Chart_Parakramesh Jaroli_Pacific University
Parakramesh Jaroli
 
Excel ppt
Excel pptExcel ppt
Excel ppt
nhumar
 
Using Microsoft Excel7 Advanced
Using Microsoft Excel7 AdvancedUsing Microsoft Excel7 Advanced
Using Microsoft Excel7 Advanced
Jack Frost
 
Working with Star Office Base - R.D.Sivakumar
Working with Star Office Base - R.D.SivakumarWorking with Star Office Base - R.D.Sivakumar
Working with Star Office Base - R.D.Sivakumar
Sivakumar R D .
 
Excel 2007- Enter Formulas
Excel 2007- Enter FormulasExcel 2007- Enter Formulas
Excel 2007- Enter Formulas
Oklahoma Dept. Mental Health
 
MS EXCEL PPT PRESENTATION
MS EXCEL PPT PRESENTATIONMS EXCEL PPT PRESENTATION
MS EXCEL PPT PRESENTATION
Mridul Bansal
 
MS Excel Pivot Table Reports & Charts
MS Excel Pivot Table Reports & ChartsMS Excel Pivot Table Reports & Charts
MS Excel Pivot Table Reports & Charts
dnbakhan
 
Integration with Office Automation Applications - R.D.Sivakumar
Integration with Office Automation Applications - R.D.SivakumarIntegration with Office Automation Applications - R.D.Sivakumar
Integration with Office Automation Applications - R.D.Sivakumar
Sivakumar R D .
 
Intro to Excel Basics: Part I
Intro to Excel Basics: Part IIntro to Excel Basics: Part I
Intro to Excel Basics: Part I
Si Krishan
 
Excel Intro Part1 2007
Excel Intro Part1 2007Excel Intro Part1 2007
Excel Intro Part1 2007
simply_coool
 
50 MS Excel Tips and Tricks
50 MS Excel Tips and Tricks 50 MS Excel Tips and Tricks
50 MS Excel Tips and Tricks
BurCom Consulting Ltd.
 
MS Excel 2013
MS Excel 2013MS Excel 2013
MS Excel 2013
Jahnavee Parmar
 
Excel tutorial
Excel tutorialExcel tutorial
Excel tutorial
beethoven jon ocubillo
 
Excel 2007 Unit C
Excel 2007 Unit CExcel 2007 Unit C
Excel 2007 Unit C
ALBAKRI MOHAMMAD
 
Getting Started with MS Access and Pivot Tables
Getting Started with MS Access and Pivot TablesGetting Started with MS Access and Pivot Tables
Getting Started with MS Access and Pivot Tables
Parth Acharya
 
Excel Graphs Charts
Excel Graphs ChartsExcel Graphs Charts
Excel Graphs Charts
simply_coool
 
Excel Intermediate
Excel IntermediateExcel Intermediate
Excel Intermediate
simply_coool
 
Pivot Table & Chart_Parakramesh Jaroli_Pacific University
Pivot Table & Chart_Parakramesh Jaroli_Pacific UniversityPivot Table & Chart_Parakramesh Jaroli_Pacific University
Pivot Table & Chart_Parakramesh Jaroli_Pacific University
Parakramesh Jaroli
 
Excel ppt
Excel pptExcel ppt
Excel ppt
nhumar
 
Using Microsoft Excel7 Advanced
Using Microsoft Excel7 AdvancedUsing Microsoft Excel7 Advanced
Using Microsoft Excel7 Advanced
Jack Frost
 
Working with Star Office Base - R.D.Sivakumar
Working with Star Office Base - R.D.SivakumarWorking with Star Office Base - R.D.Sivakumar
Working with Star Office Base - R.D.Sivakumar
Sivakumar R D .
 
MS EXCEL PPT PRESENTATION
MS EXCEL PPT PRESENTATIONMS EXCEL PPT PRESENTATION
MS EXCEL PPT PRESENTATION
Mridul Bansal
 
MS Excel Pivot Table Reports & Charts
MS Excel Pivot Table Reports & ChartsMS Excel Pivot Table Reports & Charts
MS Excel Pivot Table Reports & Charts
dnbakhan
 
Integration with Office Automation Applications - R.D.Sivakumar
Integration with Office Automation Applications - R.D.SivakumarIntegration with Office Automation Applications - R.D.Sivakumar
Integration with Office Automation Applications - R.D.Sivakumar
Sivakumar R D .
 
Intro to Excel Basics: Part I
Intro to Excel Basics: Part IIntro to Excel Basics: Part I
Intro to Excel Basics: Part I
Si Krishan
 
Excel Intro Part1 2007
Excel Intro Part1 2007Excel Intro Part1 2007
Excel Intro Part1 2007
simply_coool
 

Similar to Dynamic Chart Switcher (20)

Pivot-Table-Handout1-projectcubicle lecture notes
Pivot-Table-Handout1-projectcubicle lecture notesPivot-Table-Handout1-projectcubicle lecture notes
Pivot-Table-Handout1-projectcubicle lecture notes
Project Cubicle
 
Introduction to Eikon Excel
Introduction to Eikon ExcelIntroduction to Eikon Excel
Introduction to Eikon Excel
isc_library
 
BIS 155 Education Specialist / snaptutorial.com
BIS 155  Education Specialist / snaptutorial.comBIS 155  Education Specialist / snaptutorial.com
BIS 155 Education Specialist / snaptutorial.com
McdonaldRyan131
 
Bis 155 Enhance teaching / snaptutorial.com
Bis 155  Enhance teaching / snaptutorial.comBis 155  Enhance teaching / snaptutorial.com
Bis 155 Enhance teaching / snaptutorial.com
HarrisGeorg46
 
OpenCastLabs Excel chapter-3
OpenCastLabs Excel chapter-3OpenCastLabs Excel chapter-3
OpenCastLabs Excel chapter-3
OpenCastLabs Consulting
 
Excel Project 2 – MS Excel (Summer 2019) Use the pro.docx
Excel Project 2 – MS Excel (Summer 2019)  Use the pro.docxExcel Project 2 – MS Excel (Summer 2019)  Use the pro.docx
Excel Project 2 – MS Excel (Summer 2019) Use the pro.docx
AASTHA76
 
Bis 155 Exceptional Education / snaptutorial.com
Bis 155 Exceptional Education / snaptutorial.comBis 155 Exceptional Education / snaptutorial.com
Bis 155 Exceptional Education / snaptutorial.com
Davis142
 
Excel Intermediate 2007
Excel Intermediate 2007Excel Intermediate 2007
Excel Intermediate 2007
simply_coool
 
Excel Project 2 – MS Excel Summer 2018 Use the project.docx
Excel Project 2 – MS Excel Summer 2018 Use the project.docxExcel Project 2 – MS Excel Summer 2018 Use the project.docx
Excel Project 2 – MS Excel Summer 2018 Use the project.docx
elbanglis
 
YearQuarterLocationCarClass Revenue NumCars 2017Q1DowntownEconomy.docx
YearQuarterLocationCarClass Revenue   NumCars  2017Q1DowntownEconomy.docxYearQuarterLocationCarClass Revenue   NumCars  2017Q1DowntownEconomy.docx
YearQuarterLocationCarClass Revenue NumCars 2017Q1DowntownEconomy.docx
adampcarr67227
 
Tutorial—In-cell Dropdown List with Challenge
Tutorial—In-cell Dropdown List with ChallengeTutorial—In-cell Dropdown List with Challenge
Tutorial—In-cell Dropdown List with Challenge
Techronology Inc.
 
Excel PowerPoint
Excel PowerPointExcel PowerPoint
Excel PowerPoint
nhumar
 
BIS 155 Lessons in Excellence / bis155.com
BIS 155 Lessons in Excellence / bis155.comBIS 155 Lessons in Excellence / bis155.com
BIS 155 Lessons in Excellence / bis155.com
kopiko33
 
BIS 155 Inspiring Innovation -- bis155.com
BIS 155 Inspiring Innovation -- bis155.comBIS 155 Inspiring Innovation -- bis155.com
BIS 155 Inspiring Innovation -- bis155.com
kopiko101
 
Excel booklet
Excel bookletExcel booklet
Excel booklet
pacevedoma Acemaci
 
Bis 155 Education Organization / snaptutorial.com
Bis 155 Education Organization / snaptutorial.comBis 155 Education Organization / snaptutorial.com
Bis 155 Education Organization / snaptutorial.com
Baileya121
 
Excel Project 1 – MS Excel (Summer 2018) Use the project descripti.docx
Excel Project 1 – MS Excel (Summer 2018) Use the project descripti.docxExcel Project 1 – MS Excel (Summer 2018) Use the project descripti.docx
Excel Project 1 – MS Excel (Summer 2018) Use the project descripti.docx
elbanglis
 
Excel Project 1 – MS Excel (Summer 2018) Use the project descripti.docx
Excel Project 1 – MS Excel (Summer 2018) Use the project descripti.docxExcel Project 1 – MS Excel (Summer 2018) Use the project descripti.docx
Excel Project 1 – MS Excel (Summer 2018) Use the project descripti.docx
cravennichole326
 
BIS 155 Education for Service--bis155.com
BIS 155 Education for Service--bis155.comBIS 155 Education for Service--bis155.com
BIS 155 Education for Service--bis155.com
williamwordsworth8
 
BIS 155 Redefined Education--bis155.com
BIS 155 Redefined Education--bis155.comBIS 155 Redefined Education--bis155.com
BIS 155 Redefined Education--bis155.com
agathachristie204
 
Pivot-Table-Handout1-projectcubicle lecture notes
Pivot-Table-Handout1-projectcubicle lecture notesPivot-Table-Handout1-projectcubicle lecture notes
Pivot-Table-Handout1-projectcubicle lecture notes
Project Cubicle
 
Introduction to Eikon Excel
Introduction to Eikon ExcelIntroduction to Eikon Excel
Introduction to Eikon Excel
isc_library
 
BIS 155 Education Specialist / snaptutorial.com
BIS 155  Education Specialist / snaptutorial.comBIS 155  Education Specialist / snaptutorial.com
BIS 155 Education Specialist / snaptutorial.com
McdonaldRyan131
 
Bis 155 Enhance teaching / snaptutorial.com
Bis 155  Enhance teaching / snaptutorial.comBis 155  Enhance teaching / snaptutorial.com
Bis 155 Enhance teaching / snaptutorial.com
HarrisGeorg46
 
Excel Project 2 – MS Excel (Summer 2019) Use the pro.docx
Excel Project 2 – MS Excel (Summer 2019)  Use the pro.docxExcel Project 2 – MS Excel (Summer 2019)  Use the pro.docx
Excel Project 2 – MS Excel (Summer 2019) Use the pro.docx
AASTHA76
 
Bis 155 Exceptional Education / snaptutorial.com
Bis 155 Exceptional Education / snaptutorial.comBis 155 Exceptional Education / snaptutorial.com
Bis 155 Exceptional Education / snaptutorial.com
Davis142
 
Excel Intermediate 2007
Excel Intermediate 2007Excel Intermediate 2007
Excel Intermediate 2007
simply_coool
 
Excel Project 2 – MS Excel Summer 2018 Use the project.docx
Excel Project 2 – MS Excel Summer 2018 Use the project.docxExcel Project 2 – MS Excel Summer 2018 Use the project.docx
Excel Project 2 – MS Excel Summer 2018 Use the project.docx
elbanglis
 
YearQuarterLocationCarClass Revenue NumCars 2017Q1DowntownEconomy.docx
YearQuarterLocationCarClass Revenue   NumCars  2017Q1DowntownEconomy.docxYearQuarterLocationCarClass Revenue   NumCars  2017Q1DowntownEconomy.docx
YearQuarterLocationCarClass Revenue NumCars 2017Q1DowntownEconomy.docx
adampcarr67227
 
Tutorial—In-cell Dropdown List with Challenge
Tutorial—In-cell Dropdown List with ChallengeTutorial—In-cell Dropdown List with Challenge
Tutorial—In-cell Dropdown List with Challenge
Techronology Inc.
 
Excel PowerPoint
Excel PowerPointExcel PowerPoint
Excel PowerPoint
nhumar
 
BIS 155 Lessons in Excellence / bis155.com
BIS 155 Lessons in Excellence / bis155.comBIS 155 Lessons in Excellence / bis155.com
BIS 155 Lessons in Excellence / bis155.com
kopiko33
 
BIS 155 Inspiring Innovation -- bis155.com
BIS 155 Inspiring Innovation -- bis155.comBIS 155 Inspiring Innovation -- bis155.com
BIS 155 Inspiring Innovation -- bis155.com
kopiko101
 
Bis 155 Education Organization / snaptutorial.com
Bis 155 Education Organization / snaptutorial.comBis 155 Education Organization / snaptutorial.com
Bis 155 Education Organization / snaptutorial.com
Baileya121
 
Excel Project 1 – MS Excel (Summer 2018) Use the project descripti.docx
Excel Project 1 – MS Excel (Summer 2018) Use the project descripti.docxExcel Project 1 – MS Excel (Summer 2018) Use the project descripti.docx
Excel Project 1 – MS Excel (Summer 2018) Use the project descripti.docx
elbanglis
 
Excel Project 1 – MS Excel (Summer 2018) Use the project descripti.docx
Excel Project 1 – MS Excel (Summer 2018) Use the project descripti.docxExcel Project 1 – MS Excel (Summer 2018) Use the project descripti.docx
Excel Project 1 – MS Excel (Summer 2018) Use the project descripti.docx
cravennichole326
 
BIS 155 Education for Service--bis155.com
BIS 155 Education for Service--bis155.comBIS 155 Education for Service--bis155.com
BIS 155 Education for Service--bis155.com
williamwordsworth8
 
BIS 155 Redefined Education--bis155.com
BIS 155 Redefined Education--bis155.comBIS 155 Redefined Education--bis155.com
BIS 155 Redefined Education--bis155.com
agathachristie204
 
Ad

More from Techronology Inc. (8)

Using Google Analytics in T-Trendset 1.1
Using Google Analytics in T-Trendset 1.1Using Google Analytics in T-Trendset 1.1
Using Google Analytics in T-Trendset 1.1
Techronology Inc.
 
Overview of T-Trendset 1.1
Overview of T-Trendset 1.1Overview of T-Trendset 1.1
Overview of T-Trendset 1.1
Techronology Inc.
 
Printing and Metacharacters
Printing and MetacharactersPrinting and Metacharacters
Printing and Metacharacters
Techronology Inc.
 
Input and Output Control
Input and Output ControlInput and Output Control
Input and Output Control
Techronology Inc.
 
Linux Directory Structure
Linux Directory StructureLinux Directory Structure
Linux Directory Structure
Techronology Inc.
 
Vi And Linux Environment
Vi And Linux EnvironmentVi And Linux Environment
Vi And Linux Environment
Techronology Inc.
 
Shell Scripting With Arguments
Shell Scripting With ArgumentsShell Scripting With Arguments
Shell Scripting With Arguments
Techronology Inc.
 
The Elevator
The ElevatorThe Elevator
The Elevator
Techronology Inc.
 
Ad

Dynamic Chart Switcher

  • 1. Dynamic Chart with Dropdown List ControlFebruary 18, 2011
  • 2. OverviewWe will create a chart in Microsoft Excel that updates automatically based on a selection from an in-cell dropdown listThis chart will function based on quarterly figures as its data sourceThe main purpose is to show users the dynamic functionality of Microsoft Excel without using macrosCopyright © 2011 Techronology. All rights reserved.
  • 3. Quick GlanceThe componentsDropdown selection listCategories and dataDynamic chartThe ideaTo be able to change the chart's data source based a user's selectionAgain, we will not show you how to create the dropdown list itself, which is covered in a separate lessonCopyright © 2011 Techronology. All rights reserved.
  • 4. RequirementsMicrosoft Excel 2007You may be able to apply the instructions in this tutorial to other versions of Microsoft ExcelOptionalCheck out the tutorials below on creating dropdown lists in Microsoft Excel(We will not cover the creation of dropdown lists in this tutorial)Copyright © 2011 Techronology. All rights reserved.Tutorial Linkshttp://www.slideshare.net/techron/incell-interactivity-dropdown-box-in-excelhttp://www.techronology.com/index.php?pageID=007002&lessonID=excel0001&lessonType=pres
  • 5. Get the Data ReadyThis data refers to the amount of money spent on business supplies and stationary for a particular businessBelow is the data you should use in this lessonCopyright © 2011 Techronology. All rights reserved.We have our data organized in cells D5 to H8, as shown below
  • 6. Enter the DataEnter the data (in cells D5 to H8) for your chart using the same numbers as belowCopyright © 2011 Techronology. All rights reserved.
  • 7. Create the In-cell Dropdown ListIn cell B6, create an in-cell dropdown list with four choices1st Quarter2nd Quarter3rd Quarter4th QuarterCopyright © 2011 Techronology. All rights reserved.
  • 8. Select Your Data and Prepare to Create ChartCopyright © 2011 Techronology. All rights reserved.11Select cells D5 to E8, which will serve as your initial data for your chartClick on the Insertmenu22
  • 9. Create a Standard Pie ChartClick on the Pie iconClick on the first pie icon in the 2-D Pie sectionCopyright © 2011 Techronology. All rights reserved.
  • 10. Chart DisplayYou can move the chart around, resize it, etc., but it is time to make the chart more dynamicNow that the chart is created, let's make some named ranges that will work with the chartCopyright © 2011 Techronology. All rights reserved.
  • 11. Create the Named Ranges for First Two QuartersCopyright © 2011 Techronology. All rights reserved.11Select cells E6 to E8Type qtrData1 in the Name Box and press EnterSelect cells F6 to F8Type qtrData2 in the Name Box and press EnterWe cover named ranges in a previous tutorial, which is listed on the Requirements page in the beginning of this tutorial22
  • 12. Finish Creating the Named RangesCopyright © 2011 Techronology. All rights reserved.11Select cells G6 to G8Type qtrData3 in the Name Box and press EnterSelect cells H6 to H8Type qtrData4 in the Name Box and press Enter22
  • 13. Test the Dropdown ListWe now want to supply a number based on the user's selectionBelow are the index values we want to use for the dropdown list1st Quarter = 12nd Quarter = 23rd Quarter = 34th Quarter = 4So, when a user selects 3rd Quarter, for example, the value 3 should be appliedCopyright © 2011 Techronology. All rights reserved.
  • 14. Match Up Your ChoiceType the formula shown above in cell B8 and press EnterThe MATCH function searches for a specified item in a range and then returns the relative position of that item in the rangeIn our case, the range is {"1st Quarter","2nd Quarter","3rd Quarter","4th Quarter"}Copyright © 2011 Techronology. All rights reserved.
  • 15. Our Match Formula BreakdownCopyright © 2011 Techronology. All rights reserved.=MATCH($B$6,{"1st Quarter","2nd Quarter","3rd Quarter","4th Quarter"},0)This is the value in cell B6 we want to lookupThese are the range of values to check B6 againstThe zero value in MATCH looks for an exact matchThe final result should be 1, 2, 3, or 4 in cell B6If a match cannot be found, an error is displayedOur dropdown list should only allow the values listed in the match range; therefore, an error should not occur
  • 16. Creating the Series Names from User SelectionsWe can now append the number produced in B6 to the text "qtrData"For example, if the user selects "2nd Quarter" then B6 will equal 2 and the text "qtrData" will become "qtrData2"Below are the text values that we want to create based on the user selection1st Quarter = "qtrData1"2nd Quarter = "qtrData2"3rd Quarter = "qtrData3"4th Quarter = "qtrData4"Copyright © 2011 Techronology. All rights reserved.
  • 17. Test the Series Text NameIn cell B9, enter the follow formula (including the quotations)…="qtrData"&B8…which will produce qrtData1, qrtData2, qrtData3, or qrtData4Copyright © 2011 Techronology. All rights reserved.Remember, cell B8 is the same as…=MATCH($B$6,{"1st Quarter","2nd Quarter","3rd Quarter","4th Quarter"},0)
  • 18. Finalize Series NameIn cell B10, combine cell B8 and B9 using the following formula…="qtrData"&MATCH($B$6,{"1st Quarter","2nd Quarter","3rd Quarter","4th Quarter"},0)This will become our master named range for the chart seriesCopyright © 2011 Techronology. All rights reserved.
  • 19. Get the Formula for the Series NameCopyright © 2011 Techronology. All rights reserved.11Click on cell B10Press function key 2 (F2) to go into edit moreSelect all the text, including the equal signPress Ctrl-C to copy the formulaOr…Select and copy the formula from the formula toolbar22
  • 20. Create the Series Named RangeCopyright © 2011 Techronology. All rights reserved.11Click Formulas from the menuClick Define Name from the Formulas ribbonType seriesData as the NamePaste in the formula you copied from cell B10 to the Refers to boxPress Enter or click OKYou may need to try this twice or type in the formula directly to get use to the procedure22
  • 21. Make the New Range Name an Indirect RangeOpen the Name Manager by pressing Ctrl-F3 or by clicking Name Manager from the Formulas ribbon (see previous page)Click on seriesDataIn the Refers to box, enclose everything in parenthesisBefore the first parenthesis, type INDIRECT See the complete formula belowCopyright © 2011 Techronology. All rights reserved.=INDIRECT("qtrData"&MATCH(Sheet1!$B$6,{"1st Quarter","2nd Quarter","3rd Quarter","4th Quarter"},0))
  • 22. INDIRECT Function NoteINDIRECT returns the reference specified by a text string. References are immediately evaluated to display their contents. Use INDIRECT when you want to change the reference to a cell within a formula without changing the formula itself.Copyright © 2011 Techronology. All rights reserved.
  • 23. Apply Your New Range Name to the ChartRight-click on a white area on the chart to view the shortcut menuClick Select Data from the shortcut menuYou can also click on the chart, select Design from Chart Tools, and click on the Select Data iconCopyright © 2011 Techronology. All rights reserved.
  • 24. Create New Data SourceCopyright © 2011 Techronology. All rights reserved.11Click on 1st Qtr and then click the Edit optionUnder Edit Series, type Sheet1!seriesData in the Series values boxPress Enter or click OKBasically, what you are doing is typing the name of your sheet, the exclamation point, and the named rangeIf your sheet's name is not "Sheet1" replace "Sheet1" with the name of your sheet22
  • 25. Test Your ChartNow when you select an option from the dropdown, the chart will update automatically according to your selectionOn the other hand, the series name or title will not change because you did not create a dynamic range name for them yetYou really do not need to unless you plan on displaying a chart or series titleSimply click on the chart title and press deleteCopyright © 2011 Techronology. All rights reserved.
  • 26. End NotesYou can now delete the contents of the test cells (B8, B9, and B10)This technique can work with almost any kind of chartOnce you get really good, you can create charts that automatically adjust to the size of a rangeYou can get the supporting Microsoft Excel file from the following site:http://www.techronology.com/products.php?prodID=less002Copyright © 2011 Techronology. All rights reserved.