Is there a way to automatically graph multiple columns in Microsoft Excel?

  • Thread starter Thread starter dingpud
  • Start date Start date
  • Tags Tags
    Excel
Click For Summary

Discussion Overview

The discussion revolves around the challenge of automatically graphing multiple columns in Microsoft Excel, particularly for users who want to visualize data with a time column and several other numeric columns. Participants explore various methods for achieving this, including the use of macros, chart wizards, and manual adjustments.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant suggests using a macro function to automate the graphing process, although they express uncertainty about its feasibility in Excel.
  • Another participant describes using the chart wizard to select columns and add series, noting the need for adjustments and the possibility of using time as a label.
  • A different approach is proposed where participants can create a single chart and then copy it for other data sets, modifying the data references as needed.
  • One participant mentions aligning data columns and using the XY scatter plot function, suggesting that separate graphs may be necessary if X-axis values differ.
  • Another participant recommends saving a chart as a user-defined format to streamline the process of creating additional charts.
  • Several participants emphasize the utility of macros for handling large datasets efficiently, with one sharing resources for learning about macros.

Areas of Agreement / Disagreement

Participants express a variety of methods for graphing multiple columns, with no clear consensus on the best approach. Some advocate for using macros, while others prefer manual methods or the chart wizard, indicating a range of opinions on the most effective solution.

Contextual Notes

Participants mention limitations related to the specific versions of Excel and the potential need for manual adjustments, which may vary based on the data structure and user familiarity with the software.

Who May Find This Useful

This discussion may be useful for engineers, data analysts, and Excel users looking for efficient ways to visualize multiple datasets, particularly those interested in automation through macros or those seeking to improve their charting skills in Excel.

dingpud
Messages
198
Reaction score
1
Maybe not the best place to ask the question, but being an engineer, I figured that I might be able to pick someone elses brain about this matter.

I have one column with a Time value in hh:mm:ss.
There are multiple other columns that I would like to graph as well...up to 15.

Rather than make a graph for each one of the columns, is there some sort of setting or program that I could use the do this automatically? All of the graph types are the same.

Someone has already suggested using Matlab to do this...I am not familiar with using Matlab just yet, so if someone has a suggestion, I would appreciate it.

Thanks.
scott
 
Engineering news on Phys.org
Hi scott,

It sounds like you want to automate the process? You might try using a macro function to do that, although I am not totally sure that's possible with excell, I know MATLAB could handel a task like that if you were to write a program. I hope that at least points you in the right direction.

Cyrus
 
Have you tried selecting just the columns and running through the chart wizard? Even without having a selection, you can select the labels and add each "series" of values separately.

For example, if I wanted to plot a series of 15 samples taken at random times and with 3 levels of data like this:

1...9:55:16...45...22...88
2...9:58:14...55...44...4
3...10:12:45...63...12...16

I'd start the chart wizard, choose the custom types tab, and choose lines on 2 axes and click next.

Its highly likely you'll need to play around with the settings now, but for each data set I'd choose those cells as a "series" and choose the appropriate label.

I used the 2 axes in case you needed to graph the time, its the only way I could make it graph the time as well as a numeric for multiple samples. Its odd though to do it, and it only let me add one more series to the graph. If you just wanted to use the time as a label, select the data and the wizard pretty much does that for you in the little sample I played with in Excel 2000.

HTH
Cliff
 
cyrusabdollahi said:
Hi scott,

It sounds like you want to automate the process? You might try using a macro function to do that, although I am not totally sure that's possible with excell, I know MATLAB could handel a task like that if you were to write a program. I hope that at least points you in the right direction.

Cyrus

I think this would work, you could record a macro where you do it 'manually' for one series or so and then expand the macro you've did in the visual basic editor of excel to do the whole thing 'automatically', so could do it staying in excel.
 
If your objective is to create one chart, make it all pretty, and then make the other 15 look exactly the same with minimal effort, the easiest way to do that is to just create copies of the first graph and then go into the "chart data" box and replace the reference cells with each column (if they're all columns with the same number of rows, you can just manually type in the letters designating the columns, which is probably faster than selecting the cells by clicking and dragging).
 
The simplest is, lining up the data columns next to each other with the X-axis values on the left and the different y-axis value columns next to it. You can also give each column an header. Then select all the required columns, including headers and activate the graph function next. Select in the graph function the version "XY (scatter)". I prefer to select one of the line functions as "sub chart type" instead of the preset plot function.

About the same idea as Moonbear suggests is creating the graphs separately especially when the X-axis has different values, using the same method for each separate graph. Then if you want to merge all the graphs, just select the source graphs one by one, hit copy, then select the target graph and paste.

http://home.wanadoo.nl/bijkerk/Arctic.jpg is a possible result.
 
Last edited by a moderator:
Also along the lines of what Moonbear mentioned, you could make one chart exactly the way it should be and save that as a user defined format (you can do it in the chart wizard). Then all you have to do is highlight the next two columns to add.

Personally, if I had a lot of charts to do, i.e. more than 20 or so, I'd go the macro option. I had an analysis job that looked at gobs of data. I relied on macros quite a bit. If you can get used to them, they are lifesavers. Use the macro recorder when you create the first chart and then stop it when it is complete. Take a look at it. You'll see exactly where the column selections are. I would guess one for...next loop could loop you through all of your dependent variable columns.
 
Much thanks

Thank you all for the responses. For the sake of time I am probably going to go down the make the first graph, copy it, then throw the data into that first graph and continue making copies.

I am very interested in working with Macros. I am going to do a search on how to use them effectively. If anyone knows of a site with a good tutorial, I would appreciate it.

Thanks again for all of the help.

Scott
 
John Walkenbach has a great site. Also, googling on excel macros will bring up a bunch of sites thatwill provide free macros. That is the way I learned.

http://www.j-walk.com/ss/

Aaron Blood has a good site as well:
http://www.xl-logic.com/
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 6 ·
Replies
6
Views
6K
Replies
7
Views
3K
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
5K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K