Excel 2010
<tbody>
[TD="align: center"]1[/TD]
[TD="bgcolor: #000000, align: center"]Customer Number[/TD]
[TD="bgcolor: #000000, align: center"]In Date-Time[/TD]
[TD="bgcolor: #000000, align: center"]Out Date-Time[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]1[/TD]
[TD="align: right"]9/3/2015 15:00[/TD]
[TD="align: right"]9/4/2015 15:36[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]2[/TD]
[TD="align: right"]9/3/2015 15:20[/TD]
[TD="align: right"]9/4/2015 9:45[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]3[/TD]
[TD="align: right"]9/5/2015 12:15[/TD]
[TD="align: right"]9/7/2015 15:59[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]4[/TD]
[TD="align: right"]9/5/2015 15:00[/TD]
[TD="align: right"]9/6/2015 15:03[/TD]
[TD="align: center"]6[/TD]
[TD="align: center"]5[/TD]
[TD="align: right"]9/7/2015 8:00[/TD]
[TD="align: right"]9/8/2015 18:09[/TD]
[TD="align: center"]7[/TD]
[TD="align: center"]6[/TD]
[TD="align: right"]9/7/2015 13:00[/TD]
[TD="align: right"]9/9/2015 13:36[/TD]
[TD="align: center"]8[/TD]
[TD="align: center"]7[/TD]
[TD="align: right"]9/10/2015 11:00[/TD]
[TD="align: right"]9/13/2015 16:52[/TD]
[TD="align: center"]9[/TD]
[TD="align: center"]8[/TD]
[TD="align: right"]9/10/2015 10:23[/TD]
[TD="align: right"]9/11/2015 7:44[/TD]
[TD="align: center"]10[/TD]
[TD="align: center"]9[/TD]
[TD="align: right"]9/11/2015 7:00[/TD]
[TD="align: right"]9/12/2015 10:36[/TD]
[TD="align: center"]11[/TD]
[TD="align: center"]10[/TD]
[TD="align: right"]9/11/2015 8:00[/TD]
[TD="align: right"]9/11/2015 13:52[/TD]
</tbody>
My data lists a series of customers leaving their cars for service. I'd like to develop VBA code that will count the number of cars that are present during each hour of the day.
I'm looking to create output that lists each hours of the day and the number of cars that were present during each hour. Any help would be greatly appreciated.
Here's a sample of the output:
Excel 2010
<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="bgcolor: #000000, align: center"]Hour of Day[/TD]
[TD="bgcolor: #000000, align: center"]Count of Customers[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]00[/TD]
[TD="align: right"][/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]01[/TD]
[TD="align: right"][/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]02[/TD]
[TD="align: right"][/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]03[/TD]
[TD="align: right"][/TD]
[TD="align: center"]6[/TD]
[TD="align: center"]04[/TD]
[TD="align: right"][/TD]
[TD="align: center"]7[/TD]
[TD="align: center"]05[/TD]
[TD="align: right"][/TD]
[TD="align: center"]8[/TD]
[TD="align: center"]06[/TD]
[TD="align: right"][/TD]
[TD="align: center"]9[/TD]
[TD="align: center"]07[/TD]
[TD="align: right"][/TD]
[TD="align: center"]10[/TD]
[TD="align: center"]08[/TD]
[TD="align: right"][/TD]
[TD="align: center"]11[/TD]
[TD="align: center"]09[/TD]
[TD="align: right"][/TD]
[TD="align: center"]12[/TD]
[TD="align: center"]10[/TD]
[TD="align: right"][/TD]
[TD="align: center"]13[/TD]
[TD="align: center"]11[/TD]
[TD="align: right"][/TD]
[TD="align: center"]14[/TD]
[TD="align: center"]12[/TD]
[TD="align: right"][/TD]
[TD="align: center"]15[/TD]
[TD="align: center"]13[/TD]
[TD="align: right"][/TD]
[TD="align: center"]16[/TD]
[TD="align: center"]14[/TD]
[TD="align: right"][/TD]
[TD="align: center"]17[/TD]
[TD="align: center"]15[/TD]
[TD="align: right"][/TD]
[TD="align: center"]18[/TD]
[TD="align: center"]16[/TD]
[TD="align: right"][/TD]
[TD="align: center"]19[/TD]
[TD="align: center"]17[/TD]
[TD="align: right"][/TD]
[TD="align: center"]20[/TD]
[TD="align: center"]18[/TD]
[TD="align: right"][/TD]
[TD="align: center"]21[/TD]
[TD="align: center"]19[/TD]
[TD="align: right"][/TD]
[TD="align: center"]22[/TD]
[TD="align: center"]20[/TD]
[TD="align: right"][/TD]
[TD="align: center"]23[/TD]
[TD="align: center"]21[/TD]
[TD="align: right"][/TD]
[TD="align: center"]24[/TD]
[TD="align: center"]22[/TD]
[TD="align: right"][/TD]
[TD="align: center"]25[/TD]
[TD="align: center"]23[/TD]
[TD="align: right"][/TD]
</tbody>
A | B | C | |
---|---|---|---|
<tbody>
[TD="align: center"]1[/TD]
[TD="bgcolor: #000000, align: center"]Customer Number[/TD]
[TD="bgcolor: #000000, align: center"]In Date-Time[/TD]
[TD="bgcolor: #000000, align: center"]Out Date-Time[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]1[/TD]
[TD="align: right"]9/3/2015 15:00[/TD]
[TD="align: right"]9/4/2015 15:36[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]2[/TD]
[TD="align: right"]9/3/2015 15:20[/TD]
[TD="align: right"]9/4/2015 9:45[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]3[/TD]
[TD="align: right"]9/5/2015 12:15[/TD]
[TD="align: right"]9/7/2015 15:59[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]4[/TD]
[TD="align: right"]9/5/2015 15:00[/TD]
[TD="align: right"]9/6/2015 15:03[/TD]
[TD="align: center"]6[/TD]
[TD="align: center"]5[/TD]
[TD="align: right"]9/7/2015 8:00[/TD]
[TD="align: right"]9/8/2015 18:09[/TD]
[TD="align: center"]7[/TD]
[TD="align: center"]6[/TD]
[TD="align: right"]9/7/2015 13:00[/TD]
[TD="align: right"]9/9/2015 13:36[/TD]
[TD="align: center"]8[/TD]
[TD="align: center"]7[/TD]
[TD="align: right"]9/10/2015 11:00[/TD]
[TD="align: right"]9/13/2015 16:52[/TD]
[TD="align: center"]9[/TD]
[TD="align: center"]8[/TD]
[TD="align: right"]9/10/2015 10:23[/TD]
[TD="align: right"]9/11/2015 7:44[/TD]
[TD="align: center"]10[/TD]
[TD="align: center"]9[/TD]
[TD="align: right"]9/11/2015 7:00[/TD]
[TD="align: right"]9/12/2015 10:36[/TD]
[TD="align: center"]11[/TD]
[TD="align: center"]10[/TD]
[TD="align: right"]9/11/2015 8:00[/TD]
[TD="align: right"]9/11/2015 13:52[/TD]
</tbody>
Data
My data lists a series of customers leaving their cars for service. I'd like to develop VBA code that will count the number of cars that are present during each hour of the day.
I'm looking to create output that lists each hours of the day and the number of cars that were present during each hour. Any help would be greatly appreciated.
Here's a sample of the output:
Excel 2010
A | B | |
---|---|---|
<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="bgcolor: #000000, align: center"]Hour of Day[/TD]
[TD="bgcolor: #000000, align: center"]Count of Customers[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]00[/TD]
[TD="align: right"][/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]01[/TD]
[TD="align: right"][/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]02[/TD]
[TD="align: right"][/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]03[/TD]
[TD="align: right"][/TD]
[TD="align: center"]6[/TD]
[TD="align: center"]04[/TD]
[TD="align: right"][/TD]
[TD="align: center"]7[/TD]
[TD="align: center"]05[/TD]
[TD="align: right"][/TD]
[TD="align: center"]8[/TD]
[TD="align: center"]06[/TD]
[TD="align: right"][/TD]
[TD="align: center"]9[/TD]
[TD="align: center"]07[/TD]
[TD="align: right"][/TD]
[TD="align: center"]10[/TD]
[TD="align: center"]08[/TD]
[TD="align: right"][/TD]
[TD="align: center"]11[/TD]
[TD="align: center"]09[/TD]
[TD="align: right"][/TD]
[TD="align: center"]12[/TD]
[TD="align: center"]10[/TD]
[TD="align: right"][/TD]
[TD="align: center"]13[/TD]
[TD="align: center"]11[/TD]
[TD="align: right"][/TD]
[TD="align: center"]14[/TD]
[TD="align: center"]12[/TD]
[TD="align: right"][/TD]
[TD="align: center"]15[/TD]
[TD="align: center"]13[/TD]
[TD="align: right"][/TD]
[TD="align: center"]16[/TD]
[TD="align: center"]14[/TD]
[TD="align: right"][/TD]
[TD="align: center"]17[/TD]
[TD="align: center"]15[/TD]
[TD="align: right"][/TD]
[TD="align: center"]18[/TD]
[TD="align: center"]16[/TD]
[TD="align: right"][/TD]
[TD="align: center"]19[/TD]
[TD="align: center"]17[/TD]
[TD="align: right"][/TD]
[TD="align: center"]20[/TD]
[TD="align: center"]18[/TD]
[TD="align: right"][/TD]
[TD="align: center"]21[/TD]
[TD="align: center"]19[/TD]
[TD="align: right"][/TD]
[TD="align: center"]22[/TD]
[TD="align: center"]20[/TD]
[TD="align: right"][/TD]
[TD="align: center"]23[/TD]
[TD="align: center"]21[/TD]
[TD="align: right"][/TD]
[TD="align: center"]24[/TD]
[TD="align: center"]22[/TD]
[TD="align: right"][/TD]
[TD="align: center"]25[/TD]
[TD="align: center"]23[/TD]
[TD="align: right"][/TD]
</tbody>
Output