Macro Transport Data

decent_boy

Board Regular
Joined
Dec 5, 2014
Messages
130
Office Version
  1. 2016
Platform
  1. Windows
I have data sheet and there are columns of Employee ID, Date, Start, Duration, & Break I want a macro to copy data sheet data and transpose it in result sheet, same as result sheet example I am showing below.

Shift is in col D in data sheet
Break is in col E in data sheet

Book2
ABCDE
1Employee IDDateStartDurationBreak
2DX10011/23/20239:38 AM1:53:17
3DX10011/23/20231:57 PM0:39:392:25:25
4DX10011/23/20232:46 PM0:27:100:09:55
5DX10071/23/20236:04 AM0:47:320:00:00
6DX10071/23/20236:58 AM0:05:440:06:44
7DX10071/23/20237:07 AM0:46:500:03:18
8DX10071/23/20237:59 AM0:02:490:05:03
9DX10071/23/20239:09 AM0:07:391:07:50
10DX10071/23/20239:22 AM0:09:220:04:57
11DX10071/23/20231:47 PM0:43:214:15:13
Data


Book2
ABCDEFGHIJKLMNOPQR
1DATEIDStartShiftBreakShiftBreakShiftBreakShiftBreakShiftBreakShiftBreakShiftBreakShift
21/23/2023DX10019:38:18 AM1:53:172:25:250:39:390:09:550:27:100:00:000:00:000:00:000:00:000:00:000:00:000:00:000:00:000:00:000:00:00
31/23/2023DX10076:04:08 AM0:47:320:06:440:05:440:03:180:46:500:05:030:02:491:07:500:07:390:04:570:09:224:15:130:43:210:00:000:00:00
Result
 
Further result should be like this after running macro

Book1
ABCDEFGHIJKLMNOPQR
1DATEIDStartShiftBreakShiftBreakShiftBreakShiftBreakShiftBreakShiftBreakShiftBreakShift
21/23/2023DX10019:38 AM1:532:250:390:090:270:000:000:000:000:000:000:000:000:000:00
31/23/2023DX10076:04 AM0:470:060:050:030:460:050:021:070:070:040:094:150:430:000:00
41/24/2023DX10019:38 AM1:532:250:390:090:27
51/24/2023DX10076:04 AM0:470:060:05
Result
 
Upvote 0

Forum statistics

Threads
1,216,174
Messages
6,129,296
Members
449,498
Latest member
Lee_ray

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