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
 

Some videos you may like

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

baillieston

Board Regular
Joined
Jan 9, 2003
Messages
94
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
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,216
Office Version
  1. 365
Platform
  1. Windows
Have you posted the same spreadsheet twice by mistake?
 

baillieston

Board Regular
Joined
Jan 9, 2003
Messages
94

ADVERTISEMENT

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
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,216
Office Version
  1. 365
Platform
  1. Windows
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.
 

baillieston

Board Regular
Joined
Jan 9, 2003
Messages
94
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
 

Watch MrExcel Video

Forum statistics

Threads
1,122,204
Messages
5,594,823
Members
413,941
Latest member
jmcarthur86

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
Top