Microsoft Office Forums


Reply
Thread Tools Display Modes

Transpose large data from columns to rows

 
 
Klemen25
Guest
Posts: n/a

 
      03-10-2010, 06:30 AM
Hello thanks for the help if possible.

I have 2 columns. Column A contains names of employees column B
contains the trainings the employees attended.

Each employee has different number of trainings (I got this data
sorted by simple pivot table)

A B
Employee X training 1
Employee X training 2
Employee X training 3
Employee Y training 3
Employee Y training 2
Employee Z training 5
Employee Z training 7
Employee Z training 3
Employee Z training 1


I would like to somehow change data that the name of the employee
would be in column A, and all his trainings would be moved (instead of
vertically) horizontally (to columns B, C, D,E…). So:

A B
C D E
Employee X training 1 training 2 training
3
Employee Y training 3 training 2
Employee Z training 5 training 7
training 3 training 1

Any ideas how to achieve this? Transpose could be used to simply
change this layout, but the number of total employees is too large so
it would take to long.

Thank you
 
Reply With Quote
 
 
 
 
Klemen25
Guest
Posts: n/a

 
      03-10-2010, 06:37 AM
Perhaps more understandable result I seek:

ABCDE
Employee X training 1 training 2 training 3
Employee Y training 3 training 2
Employee Z training 5 training 7 training 3 training 1
 
Reply With Quote
 
Klemen25
Guest
Posts: n/a

 
      03-10-2010, 08:39 AM
I managed to find the problem myself, useing pivot table, if forumals
and deleting blank cells. Took me some time, but I did it
Thanks
 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a

 
      03-10-2010, 12:35 PM
Without pivot table

Sub lineemup()
For i = Cells(Rows.Count, 1).End(xlUp).Row To 1 Step -1
If Cells(i, 1) = Cells(i + 1, 1) Then
nc = Cells(i, Columns.Count).End(xlToLeft).Column + 1
Cells(i + 1, 2).Resize(, nc).Copy Cells(i, nc)
Rows(i + 1).Delete
End If
Next i
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"Klemen25" <(E-Mail Removed)> wrote in message
news:86bcaa4c-dcc4-4c3b-a7ba-(E-Mail Removed)...
Hello thanks for the help if possible.

I have 2 columns. Column A contains names of employees column B
contains the trainings the employees attended.

Each employee has different number of trainings (I got this data
sorted by simple pivot table)

A B
Employee X training 1
Employee X training 2
Employee X training 3
Employee Y training 3
Employee Y training 2
Employee Z training 5
Employee Z training 7
Employee Z training 3
Employee Z training 1


I would like to somehow change data that the name of the employee
would be in column A, and all his trainings would be moved (instead of
vertically) horizontally (to columns B, C, D,E�). So:

A B
C D E
Employee X training 1 training 2 training
3
Employee Y training 3 training 2
Employee Z training 5 training 7
training 3 training 1

Any ideas how to achieve this? Transpose could be used to simply
change this layout, but the number of total employees is too large so
it would take to long.

Thank you

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending data to SQL Server Steve_B Visio Newsgroup 5 03-02-2010 05:33 PM
Can't Open Outlook Ralph Outlook Newsgroup 35 03-01-2010 04:30 PM
how to change data series graphed from column to row in 2007ppt? Sweetmj PowerPoint Newsgroup 0 03-01-2010 03:33 PM



All times are GMT. The time now is 02:06 PM.