Help with Sorting rows and columns

baillieston

Board Regular
Joined
Jan 9, 2003
Messages
94
Is there a way that I can achieve this with VBA code or with formula.

I have a sheet with 9 columns
They are headed as follows:

Employee
Task
Min worked Mon dd/mm/yy
Min worked Tue dd/mm/yy
Min worked Wed dd/mm/yy
Min worked Thu dd/mm/yy
Min worked Fri dd/mm/yy
Min worked Sat dd/mm/yy
Min worked Sun dd/mm/yy

Min worked being the minutes worked on a task
rows would look like this

Employee A : Task 1 : 50 : 20: 120:0:0:20:0:
Employee B : Task 3 : 50 : 20: 120:0:0:70:0:
Employee C : Task 5 : 0 : 20: 200:0:0:20:0:
Employee D : Task 1 : 10 : 20: 40:0:0:20:0:


I have hundreds of rows already like this.
My problem is I would like to change the set up to read like this:

Columns would now be named as follows:

Date
Employee
Task
Mins Worked

My example would now look like this:
Mon 14/02/05 : Employee A: Task 1:50
Tue 15/02/05 : Employee A: Task 1:20
Wed 16/02/05 : Employee A: Task 1:120
Thu 17/02/05 : Employee A: Task 1:0
Fri 18/02/05 : Employee A: Task 1:0
Sat 19/02/05 : Employee A: Task 1:20
Sun 20/02/05 : Employee A: Task 1:0
Mon 14/02/05 : Employee B: Task 3:20


Hope this makes sense.
I don't know how to include an example like the ones some people include.

Hope someone can help me here.
Thanks
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Hi Tamer,

I have attempted to use the HTML Maker. Thanks for the advice.
Hear goes ...

This is what my original sheet looks like as I have tried to explain previously.
example for board.xls
ABCDEFGHIJ
1MinsWorkedontaskeachday
2EmployeeTask14/02/200515/02/200516/02/200517/02/200518/02/200519/02/200520/02/2005
3AEmployeeTask1102000120300
4BEmployeeTask2300010001010
5CEmployeeTask1101010103000
6DEmployeeTask3506000000
7DEmployeeTask521006030302070
Sheet1


What I require help on is how to use some code that will copy the cells elsewhere to look like this format
example for board.xls
ABCDEFGHIJ
1MinsWorkedontaskeachday
2EmployeeTask14/02/200515/02/200516/02/200517/02/200518/02/200519/02/200520/02/2005
3AEmployeeTask1102000120300
4BEmployeeTask2300010001010
5CEmployeeTask1101010103000
6DEmployeeTask3506000000
7DEmployeeTask521006030302070
Sheet1


I could do this manually but I have hundreds of rows and it is something I have to do often.

Hope someone can help.
Thanks
 
Upvote 0
Have you posted the same spreadsheet twice by mistake?
 
Upvote 0
Sorry my 2nd image is the same as the 1st. It should be ( fingers crossed )
example for board.xls
ABCDE
14DateEmployeeTaskMinWorkedblank
1514/02/2005AEmployeeTask110
1615/02/2005AEmployeeTask120
1716/02/2005AEmployeeTask10
1817/02/2005AEmployeeTask10
1918/02/2005AEmployeeTask1120
2019/02/2005AEmployeeTask130
2120/02/2005AEmployeeTask10
2214/02/2005BEmployeeTask230
2315/02/2005BEmployeeTask20
2416/02/2005BEmployeeTask20
2517/02/2005BEmployeeTask2100
2618/02/2005BEmployeeTask20
2719/02/2005BEmployeeTask210
2820/02/2005BEmployeeTask210
Sheet1
 
Upvote 0
You might what to edit your posts to remove the

See here <a href ="http://www.mrexcel.com/board2/viewtopic.php?t=131105"> HTML Maker and </a>.

If you do that it will be easier to copy you sample data into Excel so we can help you.
 
Upvote 0
Thanks Norie,

Here goes again.
My original data looks like this.
example for board.xls
ABCDEFGHIJ
1Mins Worked on task each day
2EmployeeTask14/02/200515/02/200516/02/200517/02/200518/02/200519/02/200520/02/2005
3A EmployeeTask 1102000120300
4B EmployeeTask 2300010001010
5C EmployeeTask 1101010103000
6D EmployeeTask 3506000000
7D EmployeeTask 521006030302070
Sheet1



I would like help on making it look like this.
example for board.xls
ABCDE
14DateEmployeeTaskMin Worked
1514/02/2005A EmployeeTask 110
1615/02/2005A EmployeeTask 120
1716/02/2005A EmployeeTask 10
1817/02/2005A EmployeeTask 10
1918/02/2005A EmployeeTask 1120
2019/02/2005A EmployeeTask 130
2120/02/2005A EmployeeTask 10
2214/02/2005B EmployeeTask 230
2315/02/2005B EmployeeTask 20
2416/02/2005B EmployeeTask 20
2517/02/2005B EmployeeTask 2100
2618/02/2005B EmployeeTask 20
2719/02/2005B EmployeeTask 210
2820/02/2005B EmployeeTask 210
Sheet1


Hope this has worked and somone can help.
Thanks
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,488
Members
448,967
Latest member
visheshkotha

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top