Month Data in a Pivot Table?

K

Kent

This may be somewhat difficult to articulate, but ... I
know that I can easily create "logical looking" (i.e. left
to right) Jan - Dec, column headings in a pivot table when
the "source" data simply has a column called "month" and
another column called "hours" (see example below). But, if
the source data is layed out so that the months are
separate column headings and run left to right (Jan thru
Dec) and each has a value in it (e.g. hours), can I get
this into a pivot table format where the months are column
headings and the hours are presented in those columns?
Maybe the issue is that (as shown in the example), "hours"
aren't a data element with a heading in the first view and
they are in the second.

Here are the structures, first the one as laid out that I
can't easily get into a pivot table format as desired:

Name Proj Jan Feb Mar
John XYZ1 160 160 160

vs

Name Proj Mon Hrs
John XYZ1 Jan 160
John XYZ1 Feb 160
John XYZ1 Mar 160
 
D

Debra Dalgleish

Put Name and Proj in the Row area, Month in the Column area, and Hours
in the data area, and you should see the format that you want.
 
K

Kent

Thank you for the idea. That works for the format in the
second example (which I knew of), but in the first
example, "hours" is not an independent data element. The
hours are values in each of the Jan, Feb, Mar, columns.
Therefore, not "drag-able" to the data area (because they
don't exist as an individual data element). Any other
ideas (or setting me straight in my thinking) are
appreciated.
 
D

Debra Dalgleish

Sorry, I misread your question. To make a pivot table work, you'd have
to restructure the data. You can use the "unpivot' technique described
by John Walkenbach, although you'd have to combine the data in the first
two columns first, then split it afterwards:

http://j-walk.com/ss/excel/usertips/tip068.htm

Or, instead of a pivot table, you could use formulas to total the hours
per project per month.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top