View Single Post
Unread 7 Jul 2004, 20:15   #2
JetLinus
Friendly geek of GD :-/
 
JetLinus's Avatar
 
Join Date: Nov 2000
Location: On my metal roid
Posts: 923
JetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud of
Lightbulb Re: Excel; Graph automating

Ouh, this really is a shit task to do.
It can be done using macros.
But I'm afraid, recording it won't be enough, you'll have to do some coding by hand.

Well, try this:
  1. Make sure nothing is selected on your data worksheet.
  2. Record a macro (extras, macros, record, start)
  3. Select the cells you need to create the graph
  4. Actually create the graph
  5. Stop recording the macro
  6. You'll be taken to the VBA Editor. Now the nice bit starts ^^

Well, you need to modify the beginning, where the cells which hold the source data for your graph are selected. This needs to be adapted so that various selections will work.
You could make the macro a common sub-routine / function, which accepts a given range/selection (of cells) as argument.
Then, somewhere else, cycle through all possible selections (i.e. enterprises), and pass them to this macro-function.
Also don't forget to make sure that the new graph will be created seperately, so that the last one doesn't get overwritten.

Wow, sounds really nasty this thing, it's the sort of office work I don't like ^^

And you're probably going to HATE Mr. PaperClip (but you'll pretty much rely on him)
__________________
[»] Entropy increases! :-/
JetLinus is offline   Reply With Quote