You are on page 1of 9

Which chart you want to view?

Sales
change this to update charts
How to create your own?
First create your charts in a seperate sheet (view the "Place your charts here" sheet)
Ensure that you have placed each of your charts in one cell (adjust the size of the cell so that your charts can fit inside snugly)
Now in the sheet where you want to control the chart display, define a named range (menu > insert > name > define)
Mention the name like getChart and in the "Refers to:" area, write an indirect formula to the other sheet with charts, like:
IF('View them here'!$C$2="Sales",INDIRECT("'Place your charts here'!F11"),IF('View them
here'!$C$2="Expenses",INDIRECT("'Place your charts here'!F12"),INDIRECT("'Place your charts here'!f13")))
Now insert a dummy picture in this sheet. Any picture would do.
Select the picture and in the formula bar type =getChart (or whatever name you have given to the named range)
Change cell C2 and see the magic
learn more at
http://chandoo.org/wp
120
135
147
180 175
230
280
320
2000 2001 2002 2003 2004 2005 2006 2007
Sales
How to create your own?
First create your charts in a seperate sheet (view the "Place your charts here" sheet)
Ensure that you have placed each of your charts in one cell (adjust the size of the cell so that your charts can fit inside snugly)
Now in the sheet where you want to control the chart display, define a named range (menu > insert > name > define)
Mention the name like getChart and in the "Refers to:" area, write an indirect formula to the other sheet with charts, like:
IF('View them here'!$C$2="Sales",INDIRECT("'Place your charts here'!F11"),IF('View them
here'!$C$2="Expenses",INDIRECT("'Place your charts here'!F12"),INDIRECT("'Place your charts here'!f13")))
Now insert a dummy picture in this sheet. Any picture would do.
Select the picture and in the formula bar type =getChart (or whatever name you have given to the named range)
Change cell C2 and see the magic
learn more at
http://chandoo.org/wp
Year Sales Expenses Profits
2000 120 90 30
2001 135 95 40
2002 147 100 47
2003 180 102 78
2004 175 102 73
2005 230 106 124
2006 280 107 173
2007 320 112 208
120
135
147
180 175
230
280
320
2000 2001 2002 2003 2004 2005 2006 2007
Sales
90
95
100 102 102
106 107
112
2000 2001 2002 2003 2004 2005 2006 2007
Expenses
30
40
47
78
73
124
173
208
2000 2001 2002 2003 2004 2005 2006 2007
Profits
You can do this without code using the Camera Tool
Setup some columns with Name, Id and Picture
The Picture Cells should all be the same size / height
Paste the pictures into cells probably next to the Employees ID,
Resize the Pics to fit within the cells, You Can use the Alt while dragging to snap to cell edges
Name the Picture cells according to the ID, use Create Names, Left if the photos are next to the Id's
Setup an area where you will setup a validation and use a List, select the employee's names column
Setup a cell somewhere "EmployeeNo"which will use the Match Function to lookup the Employees name from the validated cell and return it's position from the employee list
Setup a Named Range as Employee_Pic and make it equal to = Choose(EmployeeNo, List the employees in order)
Now setup a Camera Tool where ever you want it
Select the Camera tool and in the Formnula Bar type =Employee_Pic
You should now have a Pic of the employee list in the validation box.
Yesterday I have learned this cool excel charting trick and I cant wait to share it with you all.
The problem: I have too many charts & want to show one based on selection
You have made 3 charts to show your company performance in the last 8 years. But you dont want to clutter the project report with all of them. You would rather want to show one chart and let user choose to see the any of the other two, like this:
The Solution: Use INDIRECT() and a nifty image hack
First, create your charts in a separate worksheet like this (remember you need to create all 3 charts first)
Once the charts are created adjust the width and heights of 3 cells and place one chart in each like above.
Now, go back to the sheet where you want to control the display, and define a new named range. Lets call it getChart. You can define new named ranges from menu > insert > name > define. You will see a dialog box like this (right):
In the Refers to: area we will now write an INDIRECT() spreadsheet formula to refer to one of the 3 cells where charts are placed. A sample formula is below:IF('View them here'!$C$2="Sales",INDIRECT("'Place your charts here'!F11"),IF('View them here'!$C$2="Expenses",INDIRECT("'Place your charts here'!F12"),INDIRECT("'Place your charts here'!f13")))
The above formula assumes, you are going to control chart display thru cell C2 in the sheet view them here
Now adjust a cells size in this spread sheet to be big enough so that we can fit the selected chart.
Go to Menu > Insert > Picture > From File and insert any picture. This is just for a placeholder purpose, so any picture would do, including that of your cats. :)
Finally, select the image and go to formula bar and type =getChart (or whatever name you gave to the named range), like this:
Change the value in C2 and see the magic.
How this hack works?
In excel you can assign named ranges to images inserted in the sheet. So when you adjusted the cell sizes in the sheet with charts and created indirect references through INDIRECT() formula and used it in the named range, excel fetched the content of the cell (the chart) and replaced your cats picture with that. This powerful little trick can help you make interactive dashboards within little space.
Pretty cool, eh?
Download and see in action
Here is a link to the downloadable conditional chart display workbook. I have tested this in Excel 2003, but I guess it should work the same way in most of the modern versions of excel. Feel free to drop a comment if you see this not working in a particular version.
Resize the Pics to fit within the cells, You Can use the Alt while dragging to snap to cell edges
Name the Picture cells according to the ID, use Create Names, Left if the photos are next to the Id's
Setup an area where you will setup a validation and use a List, select the employee's names column
Setup a cell somewhere "EmployeeNo"which will use the Match Function to lookup the Employees name from the validated cell and return it's position from the employee list
Setup a Named Range as Employee_Pic and make it equal to = Choose(EmployeeNo, List the employees in order)
Yesterday I have learned this cool excel charting trick and I cant wait to share it with you all.
You have made 3 charts to show your company performance in the last 8 years. But you dont want to clutter the project report with all of them. You would rather want to show one chart and let user choose to see the any of the other two, like this:
First, create your charts in a separate worksheet like this (remember you need to create all 3 charts first)
Once the charts are created adjust the width and heights of 3 cells and place one chart in each like above.
Now, go back to the sheet where you want to control the display, and define a new named range. Lets call it getChart. You can define new named ranges from menu > insert > name > define. You will see a dialog box like this (right):
In the Refers to: area we will now write an INDIRECT() spreadsheet formula to refer to one of the 3 cells where charts are placed. A sample formula is below:IF('View them here'!$C$2="Sales",INDIRECT("'Place your charts here'!F11"),IF('View them here'!$C$2="Expenses",INDIRECT("'Place your charts here'!F12"),INDIRECT("'Place your charts here'!f13")))
The above formula assumes, you are going to control chart display thru cell C2 in the sheet view them here
Now adjust a cells size in this spread sheet to be big enough so that we can fit the selected chart.
Go to Menu > Insert > Picture > From File and insert any picture. This is just for a placeholder purpose, so any picture would do, including that of your cats. :)
Finally, select the image and go to formula bar and type =getChart (or whatever name you gave to the named range), like this:
In excel you can assign named ranges to images inserted in the sheet. So when you adjusted the cell sizes in the sheet with charts and created indirect references through INDIRECT() formula and used it in the named range, excel fetched the content of the cell (the chart) and replaced your cats picture with that. This powerful little trick can help you make interactive dashboards within little space.
Here is a link to the downloadable conditional chart display workbook. I have tested this in Excel 2003, but I guess it should work the same way in most of the modern versions of excel. Feel free to drop a comment if you see this not working in a particular version.
You have made 3 charts to show your company performance in the last 8 years. But you dont want to clutter the project report with all of them. You would rather want to show one chart and let user choose to see the any of the other two, like this:
Now, go back to the sheet where you want to control the display, and define a new named range. Lets call it getChart. You can define new named ranges from menu > insert > name > define. You will see a dialog box like this (right):
In the Refers to: area we will now write an INDIRECT() spreadsheet formula to refer to one of the 3 cells where charts are placed. A sample formula is below:IF('View them here'!$C$2="Sales",INDIRECT("'Place your charts here'!F11"),IF('View them here'!$C$2="Expenses",INDIRECT("'Place your charts here'!F12"),INDIRECT("'Place your charts here'!f13")))
In excel you can assign named ranges to images inserted in the sheet. So when you adjusted the cell sizes in the sheet with charts and created indirect references through INDIRECT() formula and used it in the named range, excel fetched the content of the cell (the chart) and replaced your cats picture with that. This powerful little trick can help you make interactive dashboards within little space.
Here is a link to the downloadable conditional chart display workbook. I have tested this in Excel 2003, but I guess it should work the same way in most of the modern versions of excel. Feel free to drop a comment if you see this not working in a particular version.
In the Refers to: area we will now write an INDIRECT() spreadsheet formula to refer to one of the 3 cells where charts are placed. A sample formula is below:IF('View them here'!$C$2="Sales",INDIRECT("'Place your charts here'!F11"),IF('View them here'!$C$2="Expenses",INDIRECT("'Place your charts here'!F12"),INDIRECT("'Place your charts here'!f13")))
In excel you can assign named ranges to images inserted in the sheet. So when you adjusted the cell sizes in the sheet with charts and created indirect references through INDIRECT() formula and used it in the named range, excel fetched the content of the cell (the chart) and replaced your cats picture with that. This powerful little trick can help you make interactive dashboards within little space.
In excel you can assign named ranges to images inserted in the sheet. So when you adjusted the cell sizes in the sheet with charts and created indirect references through INDIRECT() formula and used it in the named range, excel fetched the content of the cell (the chart) and replaced your cats picture with that. This powerful little trick can help you make interactive dashboards within little space.

You might also like