View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ken Johnson Ken Johnson is offline
external usenet poster
 
Posts: 1,073
Default Need help with recording a macro, attaching a button


oxicottin wrote:
Hello I have a spreadsheet in excel and I want to acomplish a task. I
have a sheet that has a few cells that I want in a pie graph "Cell
AX25, AO28 and AT26". I want to have on my sheet a button called
"Delay-Total Footage-%" that would run a macro to give me this pie
chart. Thing is sometimes I change the numbers on the graph which would
give me different numbers in "Cell AX25, AO28 and AT26" so if I hit the
button I would need it to update the pie graph to the current number in
those cells. Also each week I start a ner sheet that would have the
same cells needed but diferent info added I would need each sheet to
run thier own macro for that sheet and so on. The sheets are named
"Week Ending 1-7-7, Week Ending 1-14-7 and so on" Please help Im not
very good with macros so it would have to be explained....

Thanks,
Chad


Hi Chad,

I don't think you need a macro, the chart automatically updates
whenever any of the cell's values are changed.
All you need to do is set the chart up.

To set the chart up follow these steps...

1. Select AX25
2. Insert|Chart...|Chart Type: Pie|Next|Series
3. The Values: box will show the address of AX25 preceded by an equals
sign, the Sheet name and an exclamation mark. Click in the box and type
a comma immediately to the right of AX25, then click on AO28. Type
another comma then click on AT26. Then click Finish.

You didn't mention any cells on your sheet that contain the pie chart's
categories labels. If you have labels to include, then on the "Series"
tab sheet of the "Chart Wizard Step 2 of 4" dialog, click in the
Category Labels: box, then click in the cell with AX25's Category
label, type a comma, then repeat for AO28 and AT26. If there aren't any
cells on the sheet with the Category Label names you can type them
directly into the Category Labels: box. No speech marks needed, just
separate the three labels with commas, XL does the rest.

Ken Johnson