 |

09-30-2008, 07:12 AM
|
|
Freshman
|
|
Join Date: Sep 2008
Posts: 27
|
|
Control Excel charts using excel formulae
|
Hi All,
Greatings!
Is there any possibility of controling excel charts using an excel formula?
I have dynamic values being populated in a table. If the table has two columns filled dynamically, I would need to show a bar graph. If there is only one column, I would need two show a Pie Graph instead of a bar graph.
Now since the values are being populated dynamically, I would need this display of graph to be dynamic.
Can this be controlled by a excel formulae?
Any inputs or ideas would be highly appreciated.
Thanks,
JT
|
|

09-30-2008, 08:42 AM
|
|
Junior Contributor
* Expert *
|
|
Join Date: May 2008
Posts: 297
|
|
|
For sure you cannot do this with a formula.
I don't have a clue what the code would look like to change the graph, but would start by recording a macro to make the changes from one to the other, and then go from there.
|
__________________
Entia non sunt multiplicanda sine necessitate.
|

10-10-2008, 06:03 AM
|
|
Newcomer
|
|
Join Date: Oct 2008
Location: London
Posts: 3
|
|
|
I do something like this just using a formula. If my imported data has two columns, a bar chart is plotted, and if there is only one column, then a pie chart is plotted. No VBA used at all.
I don't know how to attach a file here, but feel free to email me and I'll attach the file.
|
|

10-10-2008, 06:07 AM
|
 |
Out Of Office
Retired Moderator * Expert *
|
|
Join Date: Mar 2005
Location: London, UK
Posts: 3,398
|
|
Welcome to the forum davecurtis.
Quote:
|
Originally Posted by datecurtis
I don't know how to attach a file here
|
To attach an excel file, please zip it first. When you post, click on the 'Go Advanced' button and then click on the Manage Attachments button in the additonal options section to browse and upload the zip file.
Quote:
|
Originally Posted by davecurtis
feel free to email me and I'll attach the file
|
Corresponding solutions via e-mail defeats the purpose of the public forum - I'm sure that lots of XVBT members would like to see your formula-only solution.
HTH,
COlin
|
|

10-10-2008, 08:14 AM
|
|
Newcomer
|
|
Join Date: Oct 2008
Location: London
Posts: 3
|
|
|
Hi,
Thanks for the info Colin.
File attached.
I normally dump my data in the spreadsheet and toggle between scatter, column and box-whisker plots, depending what columns are filled, but I managed it with a pie chart and clustered column chart too.
Uncheck the box to simulate having no data for the second column, and the chart switches to a pie.
Dave
|
|

10-12-2008, 09:30 AM
|
|
Junior Contributor
* Expert *
|
|
Join Date: May 2008
Posts: 297
|
|
Quote:
|
Originally Posted by shg
For sure you cannot do this with a formula.
|
I stand corrected. That's very clever, davecurtis, thank you.
|
__________________
Entia non sunt multiplicanda sine necessitate.
|

10-13-2008, 01:39 AM
|
|
Newcomer
|
|
Join Date: Oct 2008
Location: London
Posts: 3
|
|
|
Thanks shg,
Glad to contribute for a change after learning so much from these forums.
Dave
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|