View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Shane Devenshire[_2_] Shane Devenshire[_2_] is offline
external usenet poster
 
Posts: 3,346
Default Tranpose data from columns to rows

Hi,

Based on your post if you enter the following formula in E2 and copy it down
and then over

=SUMPRODUCT(--($A$2:$A$15=$D2),--($B$2:$B$15=E$1),$C$2:$C$15)

Where the you list in in columns A:C, you have a unique list of Names in
D2:D10 and the years are in E1:J1.


However, I have to second the suggestion of using a pivot table, with names
in the row area, years in the column area and weeks in the data area.

If this helps, please click the Yes button,

Cheers,
Shane Devenshire



"heyredone" wrote:

I need help with transposing data from columns to rows. I have a worksheet
as follows (sample section):

A B C
1 NAME YEAR NO. OF WORKWEEKS
2 Person A 2003 24
3 Person A 2004 50
4 Person A 2005 49
5 Person A 2006 50
6 Person A 2007 52
7 Person A 2008 45
8 Person B 2008 2
9 Person C 2005 1
10 Person D 2003 15
11 Person D 2004 2
12 Person E 2004 17
13 Person E 2005 0
14 Person E 2006 17
15 Person E 2007 31

I need the No. of Workweek data for Person A to spread across 1 row
beginning at E2 (I have other data in column D), Person B's data across 1
row, and so on. Some employees have Workweek data for years 2003 through
2008 (such as Person A), some only have data for one year or some of the
years (such as Person B and Person D).

Can someone help me with an array that will work? Thanks so much.
--
heyredone