multiple graphs in excel

S

swayze

Hi all,

I'm trying to insert multiple graphs on different worksheets from a
table (on its own worksheet) like the one below
My logic is this:
I select row "1" and row "2".
I tell excel to create a bar graph for me and insert it on the new
page.
then I delete row "2" and shift up, so row 3 becomes row 2
then I repeat the process again -
I select row "1" and row "2".
I tell excel to create a bar graph for me and insert it on the new
page.
then I delete row "2" and shift up, so row 3 becomes row 2
ect ect.

1 aa bb bb cc dd ee ff
2 100 64 101 290 253 114 136
3 100 62 70 102 132 91 122
4 100 66 74 110 155 84 138
5 100 65 73 110 150 86 134

The problem is that, when I go back to the first graph excel gives me
an error "Your formula contains an invalid reference to a worksheet,
please verify that the path, workbook or range name ar correct".

I realize this is hapening because I am deleting row 2. But, if I dont
do this, Excel wont let me make a graph of only row "1" and row "3" and
then row 1 and row 4 ect ect ect. Is the a way around this? Am I
missing something really silly here?

Does anyone have an Idea how I can get around this? besides copying and
pasting the data on different sheets I mean. I'm automating using C#,
but thats not the problem. Doing this manualy causes the same errors. I
went through a recorded macro, but since its causing an error its of no
use.

Any advice would be appreciated.

Thanks in advance and best regards,

Swayze
 
N

NickHK

If you are concerned with the creation and not editing later, then convert
the chart to a picture :

ActiveChart.CopyPicture Appearance:=xlPrinter, Size:=xlScreen,
Format:=xlPicture
ActiveSheet.Paste

NickHK
 
J

Jon Peltier

Do you mean the charts are on their own worksheets (with the grid
underneath) or on their own chart sheets?

You can make a chart using discontiguous ranges. Select a multiple area
range by selecting the first area, then holding CTRL while selecting the
next area. The chart wizard will accept this range if the areas line up
(i.e., start in the same column or row and have the same number of cells).

You can also change the source data for a chart. Make your first chart from
rows 1 & 2, then copy the chart (CTRL+drag the sheet tab). Go to Source Data
on the Chart menu, click on the Series tab, and change the range indicated
in the Y Values box.

- Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top