Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Rockne06
 
Posts: n/a
Default Convert data from a table to a chart?

I have 30 years of data in monthly increments. The years are listed by rows
and the months are listed by columns. How can I get this into a line chart?
  #2   Report Post  
Jess
 
Posts: n/a
Default

Select all the data you wnt to put into the chart including the headings and
then InsertChart and select the line chart option.

"Rockne06" wrote:

I have 30 years of data in monthly increments. The years are listed by rows
and the months are listed by columns. How can I get this into a line chart?

  #3   Report Post  
John Mansfield
 
Posts: n/a
Default

Jess,

Assume the first table starts in A1 and covers the
range A1:D8. The macro below will rearrange
the table into columns. From here you can
sort the data and then plot it as one line.


2001 2002 2003
Jan 1 5 9
Feb 2 6 10
Mar 3 7 11


Sub RearrangeData()
Dim Rng1 As Range, Rng2 As Range
Set Rng2 = Sheets("Sheet1").Range("C8")
For Each Rng1 In Range("B2:D4")
Rng2.Formula = "=" & Rng1.Address
Rng2.Offset(0, -1) = "=$A" & Rng1.Row
Rng2.Offset(0, -2) = Range("A1").Offset(0, Rng1.Column - 1)
Set Rng2 = Rng2.Offset(1, 0)
Next Rng1
End Sub


Year Month Number
2001 Jan 1
2002 Jan 5
2003 Jan 9
2001 Feb 2
2002 Feb 6
2003 Feb 10
2001 Mar 3
2002 Mar 7
2003 Mar 11

----
Regards,
John Mansfield
http://www.pdbook.com



"Jess" wrote:

Select all the data you wnt to put into the chart including the headings and
then InsertChart and select the line chart option.

"Rockne06" wrote:

I have 30 years of data in monthly increments. The years are listed by rows
and the months are listed by columns. How can I get this into a line chart?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
changing proportion of chart and data table Dawn Parks Charts and Charting in Excel 3 January 6th 05 01:18 AM
multiple or changing colours in a data table on an excel chart fo. Kerri Buxton Charts and Charting in Excel 2 December 23rd 04 07:39 PM
Running Data Table using an input that triggers DDE linked data [email protected] Excel Discussion (Misc queries) 1 December 16th 04 11:56 AM
Data Table - does it work with DDE links and Stock Tickers? Post Tenebras Lux Excel Worksheet Functions 0 December 1st 04 05:17 PM
Data Table - Does it work with DDE links and stock tickers? Post Tenebras Lux Excel Discussion (Misc queries) 0 December 1st 04 05:15 PM


All times are GMT +1. The time now is 04:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"