Solved

Arrange data in Excel to produce a line chart

Posted on 2013-11-14
4
420 Views
Last Modified: 2013-11-15
Using Excel 2010, I want to be able to generate a line chart that will display the dollar fluctuations over time for each location. I've attached a small Excel file just to show the general format of the source files I'm dealing with. The actual files are much larger and contain many more dates and many more locations. To try to keep things simple, in the attached file, I'm just using a couple of state abbreviations to represent different locations.

I was previously told that in order to produce the line chart I described, the data needs to be rearranged as follows:

First column should: Date
Second column: Location
Third column: Amount

Sorted by Date and then by Location

Then create a new table with the data sorted as follows:

in the first row the different locations and in the 1st col the dates and then inserting the rest of the data

My question is:  

Is there a built in function or a macro that can rearrange the data into the format I need?
Again, my files can be quite large (sometimes as many as about 2,000 records). But they (the source files) will always be just 3 columns of data (Location, Date and Amount).
When dealing with many locations and many dates, manually rearranging the data will take forever and is prone to lots of errors.  Thanks.
TestFile.xlsx
0
Comment
Question by:dbfromnewjersey
  • 2
  • 2
4 Comments
 
LVL 48

Expert Comment

by:Rgonzo1971
Comment Utility
HI,

you could use a PivotChart

See Sheet2

Regards
Copy-of-TestFile.xlsx
0
 

Author Comment

by:dbfromnewjersey
Comment Utility
Thanks.  But what would be the steps to generate that?
0
 
LVL 48

Accepted Solution

by:
Rgonzo1971 earned 500 total points
Comment Utility
HI,

Insert / Tables / Pivot Chart

Select the range / OK

a new sheet is created

In the Window Pivot Table List
Tick Location, Date and Amount

With Drag and Drop
   Place Location in Legend Fields
   Place Amount in Values
   Place Date in Axis Fields

PivotChart Tools / Design / Type / Change Chart Type
to Line Chart / OK

PivotChart Tools / Design / Data / Select Data
Click Hidden and Empty Cells
   Connect data points with line / OK /OK

That's it

Regards
0
 

Author Comment

by:dbfromnewjersey
Comment Utility
Thanks.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now