Well I have started using excel to create graphs but I am running into an annoying issue.
I want to use the exact same settings for every graph as well as make sure its the exact same size.
I attempted to google this but kept coming back with templates.
Cheers
-
Excels user defined graph templates are notoriously horrible. In my experience, you have two options:
1) Create a custom template with the colors and line styles you want (about all the templates are good for) and set the size manually by Alt-Dragging the edges to cells. By holding Alt, the graph will snap to the cells and you can make several graphs the same size by making your cells very large.
I.e. set the size of your excel cells very large manually so that you have one graph, per cell.
2) Use macros. The Visual-Basic based macros in Excel are extremely easy to learn and very powerful to use for many applications. It should be relatively easy to make a macro so that you can just select a graph, then run the macro on that selected item to perform a set of tasks on it.
Hope that helps,
Kevin -
I think I may have misunderstood your message.
To create a User-Defined chart in Excel is a little bit odd. When you select the chart type, there is an option for "User-Defined'... but there is no Add button or any way to create your chart type.
1. In Excel (Office XP, at least), you need to first create your chart using one of their default templates.
2. Next, modify the charts colors and styles according to your preference.
3. Right click on the chart, select " Chart Type..."
4. Select the " Custom Types" tab at the top of the GUI that opens.
5. Select the " User-defined" radio buttom.
6. Click " Add..."
The rest should be self explanatory! -
Thank you kevin! How do I use it after I add it?
-
After you add it, the next time you create a chart you can select it from the "Custom Types" tab. It is in the same window where you would normally select Scatter Plot, Bar Graph, Pie Graph, etc.
-
Thanks Kevin
Will this also let me have a set size (like 400X500 px) -
No, to do that you'd need to use a Macro. I forget the exact syntax, but it is probably online somewhere.
Or else, you could try the following:
1) Select your graph (important to do this first)
2) Start recording a macro
3) Resize your graph vertically and horizontally (temporary sizes)
4) Stop recording the macro
5) Edit the macro
(a) Find the lines that set the size
(b) Change the values to what you need
6) Save the macro
-----
Next, to use that macro you would just select the new chart that you created and run the macro.
The code will be something like this:
Code:Sub Macro1() ' ' Macro1 Macro ' Macro recorded 5/9/2009 by Kevin ' ' ActiveSheet.Shapes("Chart 1").ScaleWidth 0.82, msoFalse, msoScaleFromTopLeft ActiveSheet.Shapes("Chart 1").ScaleHeight 0.84, msoFalse, _ msoScaleFromBottomRight End Sub
EDIT: Apparently excel will explicitly reference the chart you select... i.e. where it says "Chart 1." Therefore, you would need to edit the macro every time you run it with the name of the specific chart that you are modifying. It is a huge pain in the , but I don't know any other way you can specifically do it without modifying the Code more to accommodate any selected graph. -
Thanks kevin Ill give it a shot!
Excel: Custom Template Save/Use?
Discussion in 'Windows OS and Software' started by X2P, May 9, 2009.