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

  • Thread starter dingpud
  • Start date
  • Tags
    Excel
In summary: Then you can expand the macro to do all the subsequent charts without ever leaving excel. There are tons of macros on the net that can do just about anything. Hope this helps. MoonbearIn summary, Scott wants to create a graph that shows the time taken for multiple samples to be taken at different times. He is not sure if it is possible to do this using Excel. Moonbear suggests using a macro function to do this. Cyrus suggests using the chart wizard to create the graphs. Finally, Moonbear suggests using a macro to create the first chart and then expanding it to do all the subsequent charts.
  • #1
dingpud
199
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
  • #2
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
 
  • #3
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 seperately.

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
 
  • #4
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.
 
  • #5
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).
 
  • #6
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 seperately 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 [Broken] is a possible result.
 
Last edited by a moderator:
  • #7
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.
 
  • #8
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
 
  • #9
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/
 

What is Microsoft Excel?

Microsoft Excel is a software program developed by Microsoft for creating and managing spreadsheets. It is part of the Microsoft Office suite and is widely used in various industries for data analysis, financial calculations, and organizing data.

How do I open an Excel spreadsheet?

To open an Excel spreadsheet, double-click on the Excel icon or search for "Excel" in your computer's search bar. You can also open Excel by going to the Start menu and selecting Microsoft Excel from the list of programs.

What are the basic functions in Excel?

The basic functions in Excel include arithmetic calculations such as addition, subtraction, multiplication, and division. It also has functions for statistical analysis, financial calculations, and data manipulation.

How do I insert a chart or graph in Excel?

To insert a chart or graph in Excel, first select the data you want to include in the chart. Then, go to the Insert tab and select the type of chart or graph you want to create. You can also customize the design and layout of your chart using the options in the Chart Tools tab.

Can I use Excel for data analysis?

Yes, Excel is commonly used for data analysis. It has various built-in functions and tools for data manipulation, sorting, and filtering. It also has features for creating pivot tables and charts, which are useful for analyzing and summarizing large amounts of data.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
777
  • Computing and Technology
Replies
1
Views
935
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
642
  • Engineering and Comp Sci Homework Help
Replies
7
Views
1K
  • Computing and Technology
Replies
6
Views
2K
  • Computing and Technology
Replies
6
Views
3K
  • Other Physics Topics
Replies
1
Views
2K
Replies
3
Views
780
  • Computing and Technology
Replies
5
Views
1K
Replies
2
Views
2K
Back
Top