ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Importing data from several fles with different subset of rows (https://www.excelbanter.com/excel-discussion-misc-queries/74362-importing-data-several-fles-different-subset-rows.html)

[email protected]

Importing data from several fles with different subset of rows
 
Hi, I apologize if this is a really basic question. I'm trying to
import a series of data for 5 years. Each year is a separate file. I'll
use a simple example as an analogy.


Say I have a store and I track my sales by item. But what I sell
changes slightly from year to year, like so:

1975:
Pet Rock 20
Guns 10
Butter 25

1990:
Pogs 30
Guns 15
Butter 25

2000:
Pokemon 10
Guns 20
Butter 30

How do I have the data so it looks like this?


1975 1990 2000
Pet Rock 20
Pogs 30
Guns 10 15 20
Butter 25 25 30
Pokemon 10


I'm sure this question has been answered in some form before so if you
can point me in the right direction I'd be grateful.


Dave Peterson

Importing data from several fles with different subset of rows
 
If you can get your data in this shape:

Item Year Qty
Pet Rock 1975 20
Guns 1975 10
Butter 1975 25
Pogs 1990 30
Guns 1990 15
Butter 1990 25
Pokemon 2000 10
Guns 2000 20
Butter 2000 30

You'd be able to use data|pivottable to create a nice summary.

The difficult part will be reformatting your data.

wrote:

Hi, I apologize if this is a really basic question. I'm trying to
import a series of data for 5 years. Each year is a separate file. I'll
use a simple example as an analogy.

Say I have a store and I track my sales by item. But what I sell
changes slightly from year to year, like so:

1975:
Pet Rock 20
Guns 10
Butter 25

1990:
Pogs 30
Guns 15
Butter 25

2000:
Pokemon 10
Guns 20
Butter 30

How do I have the data so it looks like this?

1975 1990 2000
Pet Rock 20
Pogs 30
Guns 10 15 20
Butter 25 25 30
Pokemon 10

I'm sure this question has been answered in some form before so if you
can point me in the right direction I'd be grateful.


--

Dave Peterson


All times are GMT +1. The time now is 04:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com