Solved

Arrange data in Excel to produce a line chart

Posted on 2013-11-14
4
447 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 50

Expert Comment

by:Rgonzo1971
ID: 39647952
HI,

you could use a PivotChart

See Sheet2

Regards
Copy-of-TestFile.xlsx
0
 

Author Comment

by:dbfromnewjersey
ID: 39648459
Thanks.  But what would be the steps to generate that?
0
 
LVL 50

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 39650379
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
ID: 39651003
Thanks.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Excel - INDEX MATCH error 13 24
first name and last initial in excel 11 28
I need help with an EXCEL Nested formula. 5 22
Excel Formula for Commission Structure 2 17
Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

860 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