Kamranmushtaq
New Member
- Joined
- Sep 17, 2014
- Messages
- 1
[TABLE="width: 388"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Department[/TD]
[TD]Time[/TD]
[TD]Seconds[/TD]
[TD]Frequency[/TD]
[/TR]
[TR]
[TD="align: right"]01-Sep[/TD]
[TD]HR[/TD]
[TD]0900-1100[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]01-Sep[/TD]
[TD]HR[/TD]
[TD]0900-1100[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]01-Sep[/TD]
[TD]SALES[/TD]
[TD]1900-2100[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD="align: right"]01-Sep[/TD]
[TD]SALES[/TD]
[TD]1900-2100[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD="align: right"]01-Sep[/TD]
[TD]ADMIN[/TD]
[TD]2200-2300[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]01-Sep[/TD]
[TD]ADMIN[/TD]
[TD]2300-2400[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD="align: right"]02-Sep[/TD]
[TD]HR[/TD]
[TD]0900-1100[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]02-Sep[/TD]
[TD]HR[/TD]
[TD]0900-1100[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]02-Sep[/TD]
[TD]SALES[/TD]
[TD]1900-2100[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]02-Sep[/TD]
[TD]SALES[/TD]
[TD]1900-2100[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD="align: right"]02-Sep[/TD]
[TD]ADMIN[/TD]
[TD]2200-2300[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD="align: right"]02-Sep[/TD]
[TD]CS[/TD]
[TD]2300-2400[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]5[/TD]
[/TR]
</tbody>[/TABLE]
I want to make macro format my data ifrom this format to the below format
[TABLE="width: 388"]
<tbody>[TR]
[TD]Department[/TD]
[TD]Time[/TD]
[TD]Seconds[/TD]
[TD="align: right"]01/09/2014[/TD]
[TD="align: right"]02/09/2014[/TD]
[/TR]
[TR]
[TD]HR[/TD]
[TD]0900-1100[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]HR[/TD]
[TD]0900-1100[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]HR[/TD]
[TD]0900-1100[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]HR[/TD]
[TD]0900-1100[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD]1900-2100[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD]1900-2100[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD]1900-2100[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD]1900-2100[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD]1900-2100[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD]1900-2100[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD]1900-2100[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ADMIN[/TD]
[TD]2200-2300[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]ADMIN[/TD]
[TD]2200-2300[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]ADMIN[/TD]
[TD]2200-2300[/TD]
[TD="align: right"]30[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]ADMIN[/TD]
[TD]2200-2300[/TD]
[TD="align: right"]30[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]CS[/TD]
[TD]2300-2400[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]CS[/TD]
[TD]2300-2400[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]CS[/TD]
[TD]2300-2400[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]CS[/TD]
[TD]2300-2400[/TD]
[TD="align: right"]60[/TD]
[TD][/TD]
[TD="align: right"]
1[/TD]
[/TR]
[TR]
[TD]CS[/TD]
[TD]2300-2400[/TD]
[TD="align: right"]60[/TD]
[TD][/TD]
[TD="align: right"]1
[/TD]
[/TR]
</tbody>[/TABLE]
It is sample data. number of days vary and also frequency also change
<tbody>[TR]
[TD]Date[/TD]
[TD]Department[/TD]
[TD]Time[/TD]
[TD]Seconds[/TD]
[TD]Frequency[/TD]
[/TR]
[TR]
[TD="align: right"]01-Sep[/TD]
[TD]HR[/TD]
[TD]0900-1100[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]01-Sep[/TD]
[TD]HR[/TD]
[TD]0900-1100[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]01-Sep[/TD]
[TD]SALES[/TD]
[TD]1900-2100[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD="align: right"]01-Sep[/TD]
[TD]SALES[/TD]
[TD]1900-2100[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD="align: right"]01-Sep[/TD]
[TD]ADMIN[/TD]
[TD]2200-2300[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]01-Sep[/TD]
[TD]ADMIN[/TD]
[TD]2300-2400[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD="align: right"]02-Sep[/TD]
[TD]HR[/TD]
[TD]0900-1100[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]02-Sep[/TD]
[TD]HR[/TD]
[TD]0900-1100[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]02-Sep[/TD]
[TD]SALES[/TD]
[TD]1900-2100[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]02-Sep[/TD]
[TD]SALES[/TD]
[TD]1900-2100[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD="align: right"]02-Sep[/TD]
[TD]ADMIN[/TD]
[TD]2200-2300[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD="align: right"]02-Sep[/TD]
[TD]CS[/TD]
[TD]2300-2400[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]5[/TD]
[/TR]
</tbody>[/TABLE]
I want to make macro format my data ifrom this format to the below format
[TABLE="width: 388"]
<tbody>[TR]
[TD]Department[/TD]
[TD]Time[/TD]
[TD]Seconds[/TD]
[TD="align: right"]01/09/2014[/TD]
[TD="align: right"]02/09/2014[/TD]
[/TR]
[TR]
[TD]HR[/TD]
[TD]0900-1100[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]HR[/TD]
[TD]0900-1100[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]HR[/TD]
[TD]0900-1100[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]HR[/TD]
[TD]0900-1100[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD]1900-2100[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD]1900-2100[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD]1900-2100[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD]1900-2100[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD]1900-2100[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD]1900-2100[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD]1900-2100[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ADMIN[/TD]
[TD]2200-2300[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]ADMIN[/TD]
[TD]2200-2300[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]ADMIN[/TD]
[TD]2200-2300[/TD]
[TD="align: right"]30[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]ADMIN[/TD]
[TD]2200-2300[/TD]
[TD="align: right"]30[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]CS[/TD]
[TD]2300-2400[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]CS[/TD]
[TD]2300-2400[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]CS[/TD]
[TD]2300-2400[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]CS[/TD]
[TD]2300-2400[/TD]
[TD="align: right"]60[/TD]
[TD][/TD]
[TD="align: right"]
1[/TD]
[/TR]
[TR]
[TD]CS[/TD]
[TD]2300-2400[/TD]
[TD="align: right"]60[/TD]
[TD][/TD]
[TD="align: right"]1
[/TD]
[/TR]
</tbody>[/TABLE]
It is sample data. number of days vary and also frequency also change