Home |
Search |
Today's Posts |
#1
|
|||
|
|||
How can I create a chart when double clicking a cell?
Hi - thanks for your help I am very much a novice in Excel but am
trying to learn. I've tried to recreate the worksheet below and what I want is that when you double click on the person's name (Katie or Jeff) then Excel prepares a graph showing the scores that that child achieved. I have bought a book and am trying to teach myself, but everytime I think I've got the right idea my formulae come back with errors. If you be kind enough to offer me some assistance - it would be very gratefully received! Many thanks in advance, Paul English Maths Science Katie Autumn 7 7 5 6 7 8 Spring 7 6 6 7 5 5 Summer 8 6 4 6 7 7 Jeff Autumn 6 6 5 6 6 7 Spring 7 7 5 5 6 6 Summer 7 6 6 6 6 6 |
#2
|
|||
|
|||
Hi Paul - You can record a macro to create the chart and assign a key stroke,
like CTRL + T to run the macro (rather than double-clicking the child's name). If you record a macro which creates the chart in a new sheet then the macro will create a new chart each time it runs, so you might want to delete the chart/sheet before running it. If you make a chart to appear in the current sheet rather than a new sheet I think you'll get an error when you re-run the macro, so when you record the macro make sure you create the chart in a new sheet . To run the macro by double clicking the name isn't so straight-forward - the only way I know of doing this is to add code to the worksheet's BeforeDoubleClick event in visual basic to run the macro. Let's say Katie's name is in cell A32, then if you record a macro to create the chart in a new sheet, say you've named it "Macro1", you can add this code to the worksheet's BeforeDoubleClick event in VB so it looks like this: Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) If Target.Address = "$A$32" Then Application.Run "Macro1" End If End Sub This will run the macro creating the chart when you double click cell A32. You could also add code to this to delete the last chart made so you don't end up with dozens of charts. If you're new to this just start by recording the macro to create the chart you want, assign a letter as a shortcut key using Macro Options, and see how you get on. Nige "porl99" wrote: Hi - thanks for your help I am very much a novice in Excel but am trying to learn. I've tried to recreate the worksheet below and what I want is that when you double click on the person's name (Katie or Jeff) then Excel prepares a graph showing the scores that that child achieved. I have bought a book and am trying to teach myself, but everytime I think I've got the right idea my formulae come back with errors. If you be kind enough to offer me some assistance - it would be very gratefully received! Many thanks in advance, Paul English Maths Science Katie Autumn 7 7 5 6 7 8 Spring 7 6 6 7 5 5 Summer 8 6 4 6 7 7 Jeff Autumn 6 6 5 6 6 7 Spring 7 7 5 5 6 6 Summer 7 6 6 6 6 6 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I create a "backwards" chart | Charts and Charting in Excel | |||
How do I create a pointer chart, like a speedometer? | Charts and Charting in Excel | |||
Create a custom chart, two stacked bars/month w/ two axes? | Charts and Charting in Excel | |||
Problem with xlusrgal.xls file | Charts and Charting in Excel | |||
create space in line chart between points, linked to pivot table | Charts and Charting in Excel |