Need to write vba code to sort of transpose from a horizontal data set to a vertical data set with an extra piece of data created.
If the table 1 has no data for mon -> sun just skip
Is there an easy way.. I just seem to be way our of my depth here!!
This data set has like 10,000 centres, so doing it by hand will take forever!!!
Thanks in advance
TABLE 1 - Original
<colgroup><col><col span="2"><col><col span="10"></colgroup><tbody>
</tbody>
If the table 1 has no data for mon -> sun just skip
Is there an easy way.. I just seem to be way our of my depth here!!
This data set has like 10,000 centres, so doing it by hand will take forever!!!
Thanks in advance
TABLE 1 - Original
ServiceApprovalNumber | RatingsIssued | Last Service Approval Transfer Date | Annual Monday Start Time | Annual Monday End Time | Annual Tuesday Start Time | Annual Tuesday End Time | Annual Wednesday Start Time | Annual Wednesday End Time | Annual Thursday Start Time | Annual Thursday End Time | Annual Friday Start Time | Annual Friday End Time | listing_id |
SE-00009863 | Jul-16 | ######## | 6:30 | 18:30 | 6:30 | 18:30 | 6:30 | 18:30 | 6:30 | 18:30 | 6:30 | 18:30 | 155 |
SE-00009865 | Jun-14 | ######## | 7.45 | 17.45 | 7.45 | 17.45 | 7.45 | 17.45 | 7.45 | 17.45 | 7.45 | 17.45 | 255 |
New Sheet - TABLE 2 | |||||||||||||
ServiceApprovalNumber | listing_id | day | open_time | close_time | where day | ||||||||
SE-00009863 | 155 | 0 | 6:30 | 18:30 | 0 = Monday | ||||||||
SE-00009864 | 155 | 1 | 6:30 | 18:30 | 1 = Tuesday | ||||||||
SE-00009865 | 155 | 2 | 6:30 | 18:30 | 2 = Wednesday | ||||||||
SE-00009866 | 155 | 3 | 6:30 | 18:30 | |||||||||
SE-00009867 | 155 | 4 | 6:30 | 18:30 | skip if no hours data | ||||||||
SE-00009865 | 255 | 0 | 7.45 | 17.45 | |||||||||
SE-00009866 | 255 | 1 | 7.45 | 17.45 | |||||||||
SE-00009867 | 255 | 2 | 7.45 | 17.45 | |||||||||
SE-00009868 | 255 | 3 | 7.45 | 17.45 | |||||||||
SE-00009869 | 255 | 4 | 7.45 | 17.45 | |||||||||
<colgroup><col><col span="2"><col><col span="10"></colgroup><tbody>
</tbody>