I am trying to get total customers with an order time before(less than) 12:00 PM.
So I extracted data from our system and was able to do asave as, and saved my data as an EXCEL report (.XLS)
Order time and discharge time had 4 leading spaces in frontof each time.
So I created a new column, then entered for example, =TRIM(E1),which removed the 4 leading spaces.
I did this for the order time column and discharge timecolumn.
[TABLE="width: 402"]
<tbody>[TR]
[TD="width: 29, bgcolor: transparent"] [/TD]
[TD="width: 64, bgcolor: transparent"] [/TD]
[TD="width: 99, bgcolor: transparent"] [/TD]
[TD="width: 92, bgcolor: transparent"] [/TD]
[TD="width: 64, bgcolor: transparent"] [/TD]
[TD="width: 94, bgcolor: transparent"] [/TD]
[TD="width: 94, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"] ID
[/TD]
[TD="width: 64, bgcolor: transparent"] DEPT
[/TD]
[TD="width: 99, bgcolor: transparent"] CUSTOMER
[/TD]
[TD="width: 92, bgcolor: transparent"] ORDER DATE
[/TD]
[TD="width: 64, bgcolor: transparent"] ORDER TIME
[/TD]
[TD="width: 94, bgcolor: transparent"] DISCHARGE DATE
[/TD]
[TD="width: 94, bgcolor: transparent"] DISCHARGE TIME
[/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"] [/TD]
[TD="width: 64, bgcolor: transparent"] 3E
[/TD]
[TD="width: 99, bgcolor: transparent"] DOE, JOHN
[/TD]
[TD="width: 92, bgcolor: transparent"] [/TD]
[TD="width: 64, bgcolor: transparent"] 11:50
[/TD]
[TD="width: 94, bgcolor: transparent"] [/TD]
[TD="width: 94, bgcolor: transparent"] 12:30
[/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"] [/TD]
[TD="width: 64, bgcolor: transparent"] 3E
[/TD]
[TD="width: 99, bgcolor: transparent"] DOE,JUNE
[/TD]
[TD="width: 92, bgcolor: transparent"] [/TD]
[TD="width: 64, bgcolor: transparent"] 09:30
[/TD]
[TD="width: 94, bgcolor: transparent"] [/TD]
[TD="width: 94, bgcolor: transparent"] 11:30
[/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"] [/TD]
[TD="width: 64, bgcolor: transparent"] 3E
[/TD]
[TD="width: 99, bgcolor: transparent"] DOE,JANE
[/TD]
[TD="width: 92, bgcolor: transparent"] [/TD]
[TD="width: 64, bgcolor: transparent"] 12:30
[/TD]
[TD="width: 94, bgcolor: transparent"] [/TD]
[TD="width: 94, bgcolor: transparent"] 20:30
[/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"] [/TD]
[TD="width: 64, bgcolor: transparent"] 4E
[/TD]
[TD="width: 99, bgcolor: transparent"] DOE, JOE
[/TD]
[TD="width: 92, bgcolor: transparent"] [/TD]
[TD="width: 64, bgcolor: transparent"] 14:00
[/TD]
[TD="width: 94, bgcolor: transparent"] [/TD]
[TD="width: 94, bgcolor: transparent"] 18:00
[/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"] [/TD]
[TD="width: 64, bgcolor: transparent"] 4E
[/TD]
[TD="width: 99, bgcolor: transparent"] DOE, JAKE
[/TD]
[TD="width: 92, bgcolor: transparent"] [/TD]
[TD="width: 64, bgcolor: transparent"] 10:00
[/TD]
[TD="width: 94, bgcolor: transparent"] [/TD]
[TD="width: 94, bgcolor: transparent"] 11:50
[/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"] [/TD]
[TD="width: 64, bgcolor: transparent"] 4E
[/TD]
[TD="width: 99, bgcolor: transparent"] DOE, JILL
[/TD]
[TD="width: 92, bgcolor: transparent"] [/TD]
[TD="width: 64, bgcolor: transparent"] 06:30
[/TD]
[TD="width: 94, bgcolor: transparent"] [/TD]
[TD="width: 94, bgcolor: transparent"] 10:45
[/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"] [/TD]
[TD="width: 64, bgcolor: transparent"] 6E
[/TD]
[TD="width: 99, bgcolor: transparent"] DOE, JIM
[/TD]
[TD="width: 92, bgcolor: transparent"] [/TD]
[TD="width: 64, bgcolor: transparent"] 17:30
[/TD]
[TD="width: 94, bgcolor: transparent"] [/TD]
[TD="width: 94, bgcolor: transparent"] 19:30
[/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"] [/TD]
[TD="width: 64, bgcolor: transparent"] 6E
[/TD]
[TD="width: 99, bgcolor: transparent"] DOE, JUDE
[/TD]
[TD="width: 92, bgcolor: transparent"] [/TD]
[TD="width: 64, bgcolor: transparent"] 15:30
[/TD]
[TD="width: 94, bgcolor: transparent"] [/TD]
[TD="width: 94, bgcolor: transparent"] 21:30
[/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"] [/TD]
[TD="width: 64, bgcolor: transparent"] 9E
[/TD]
[TD="width: 99, bgcolor: transparent"] DOE, JENN
[/TD]
[TD="width: 92, bgcolor: transparent"] [/TD]
[TD="width: 64, bgcolor: transparent"] 06:00
[/TD]
[TD="width: 94, bgcolor: transparent"] [/TD]
[TD="width: 94, bgcolor: transparent"] 11:00
[/TD]
[/TR]
</tbody>[/TABLE]
So I created a macro to give me totals, see below:
[TABLE="width: 395"]
<tbody>[TR]
[TD="width: 41, bgcolor: transparent"] Unit
[/TD]
[TD="width: 240"] Order by 12PM
[/TD]
[TD="width: 246"] D/C by 12PM
[/TD]
[/TR]
[TR]
[TD="width: 41, bgcolor: transparent"] 3E
[/TD]
[TD="width: 240"] [/TD]
[TD="width: 246"] [/TD]
[/TR]
[TR]
[TD="width: 41, bgcolor: transparent"] 4E
[/TD]
[TD="width: 240"] [/TD]
[TD="width: 246"] [/TD]
[/TR]
[TR]
[TD="width: 41, bgcolor: transparent"] 6E
[/TD]
[TD="width: 240"]
[/TD]
[TD="width: 246"] [/TD]
[/TR]
[TR]
[TD="width: 41, bgcolor: transparent"] 9E
[/TD]
[TD="width: 240"] [/TD]
[TD="width: 246"] [/TD]
[/TR]
</tbody>[/TABLE]
My totals are not populating, so Ichanged the format for each time (for Order time and Discharge time): FormatCells, Custom, then I select h:mm
The data still didn’t populate….Iclicked on one of the time cells, and it displayed 11:50, when I doubledclicked on it, it then displayed 11:50:00 AM. When I did this for each timecell, then my data populated in the macro.
I don’t know why I have to double clickon each cell with a time for the new format (h:mm) to work? Any idea why thisis happening? Is there something I can do to prevent this from happening?
So I extracted data from our system and was able to do asave as, and saved my data as an EXCEL report (.XLS)
Order time and discharge time had 4 leading spaces in frontof each time.
So I created a new column, then entered for example, =TRIM(E1),which removed the 4 leading spaces.
I did this for the order time column and discharge timecolumn.
[TABLE="width: 402"]
<tbody>[TR]
[TD="width: 29, bgcolor: transparent"]
A
[TD="width: 64, bgcolor: transparent"]
B
[TD="width: 99, bgcolor: transparent"]
C
[TD="width: 92, bgcolor: transparent"]
D
[TD="width: 64, bgcolor: transparent"]
E
[TD="width: 94, bgcolor: transparent"]
F
[TD="width: 94, bgcolor: transparent"]
G
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"] ID
[/TD]
[TD="width: 64, bgcolor: transparent"] DEPT
[/TD]
[TD="width: 99, bgcolor: transparent"] CUSTOMER
[/TD]
[TD="width: 92, bgcolor: transparent"] ORDER DATE
[/TD]
[TD="width: 64, bgcolor: transparent"] ORDER TIME
[/TD]
[TD="width: 94, bgcolor: transparent"] DISCHARGE DATE
[/TD]
[TD="width: 94, bgcolor: transparent"] DISCHARGE TIME
[/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"]
1
[TD="width: 64, bgcolor: transparent"] 3E
[/TD]
[TD="width: 99, bgcolor: transparent"] DOE, JOHN
[/TD]
[TD="width: 92, bgcolor: transparent"]
5/12/2018
[TD="width: 64, bgcolor: transparent"] 11:50
[/TD]
[TD="width: 94, bgcolor: transparent"]
5/12/2018
[TD="width: 94, bgcolor: transparent"] 12:30
[/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"]
2
[TD="width: 64, bgcolor: transparent"] 3E
[/TD]
[TD="width: 99, bgcolor: transparent"] DOE,JUNE
[/TD]
[TD="width: 92, bgcolor: transparent"]
5/19/2018
[TD="width: 64, bgcolor: transparent"] 09:30
[/TD]
[TD="width: 94, bgcolor: transparent"]
5/19/2018
[TD="width: 94, bgcolor: transparent"] 11:30
[/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"]
3
[TD="width: 64, bgcolor: transparent"] 3E
[/TD]
[TD="width: 99, bgcolor: transparent"] DOE,JANE
[/TD]
[TD="width: 92, bgcolor: transparent"]
5/25/2018
[TD="width: 64, bgcolor: transparent"] 12:30
[/TD]
[TD="width: 94, bgcolor: transparent"]
5/25/2018
[TD="width: 94, bgcolor: transparent"] 20:30
[/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"]
4
[TD="width: 64, bgcolor: transparent"] 4E
[/TD]
[TD="width: 99, bgcolor: transparent"] DOE, JOE
[/TD]
[TD="width: 92, bgcolor: transparent"]
5/26/2018
[TD="width: 64, bgcolor: transparent"] 14:00
[/TD]
[TD="width: 94, bgcolor: transparent"]
5/26/2018
[TD="width: 94, bgcolor: transparent"] 18:00
[/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"]
5
[TD="width: 64, bgcolor: transparent"] 4E
[/TD]
[TD="width: 99, bgcolor: transparent"] DOE, JAKE
[/TD]
[TD="width: 92, bgcolor: transparent"]
5/31/2018
[TD="width: 64, bgcolor: transparent"] 10:00
[/TD]
[TD="width: 94, bgcolor: transparent"]
5/31/2018
[TD="width: 94, bgcolor: transparent"] 11:50
[/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"]
6
[TD="width: 64, bgcolor: transparent"] 4E
[/TD]
[TD="width: 99, bgcolor: transparent"] DOE, JILL
[/TD]
[TD="width: 92, bgcolor: transparent"]
5/12/2018
[TD="width: 64, bgcolor: transparent"] 06:30
[/TD]
[TD="width: 94, bgcolor: transparent"]
5/12/2018
[TD="width: 94, bgcolor: transparent"] 10:45
[/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"]
7
[TD="width: 64, bgcolor: transparent"] 6E
[/TD]
[TD="width: 99, bgcolor: transparent"] DOE, JIM
[/TD]
[TD="width: 92, bgcolor: transparent"]
5/19/2018
[TD="width: 64, bgcolor: transparent"] 17:30
[/TD]
[TD="width: 94, bgcolor: transparent"]
5/19/2018
[TD="width: 94, bgcolor: transparent"] 19:30
[/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"]
8
[TD="width: 64, bgcolor: transparent"] 6E
[/TD]
[TD="width: 99, bgcolor: transparent"] DOE, JUDE
[/TD]
[TD="width: 92, bgcolor: transparent"]
5/25/2018
[TD="width: 64, bgcolor: transparent"] 15:30
[/TD]
[TD="width: 94, bgcolor: transparent"]
5/25/2018
[TD="width: 94, bgcolor: transparent"] 21:30
[/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"]
9
[TD="width: 64, bgcolor: transparent"] 9E
[/TD]
[TD="width: 99, bgcolor: transparent"] DOE, JENN
[/TD]
[TD="width: 92, bgcolor: transparent"]
5/26/2018
[TD="width: 64, bgcolor: transparent"] 06:00
[/TD]
[TD="width: 94, bgcolor: transparent"]
5/26/2018
[TD="width: 94, bgcolor: transparent"] 11:00
[/TD]
[/TR]
</tbody>[/TABLE]
So I created a macro to give me totals, see below:
[TABLE="width: 395"]
<tbody>[TR]
[TD="width: 41, bgcolor: transparent"] Unit
[/TD]
[TD="width: 240"] Order by 12PM
[/TD]
[TD="width: 246"] D/C by 12PM
[/TD]
[/TR]
[TR]
[TD="width: 41, bgcolor: transparent"] 3E
[/TD]
[TD="width: 240"]
=COUNTIFS(B:B,"N3SE",H:H,"<12:00")
[TD="width: 246"]
=COUNTIFS(B:B,"N3SE",J:J,"<12:00")
[/TR]
[TR]
[TD="width: 41, bgcolor: transparent"] 4E
[/TD]
[TD="width: 240"]
[TD="width: 246"]
[/TR]
[TR]
[TD="width: 41, bgcolor: transparent"] 6E
[/TD]
[TD="width: 240"]
[TD="width: 246"]
[/TR]
[TR]
[TD="width: 41, bgcolor: transparent"] 9E
[/TD]
[TD="width: 240"]
[TD="width: 246"]
[/TR]
</tbody>[/TABLE]
My totals are not populating, so Ichanged the format for each time (for Order time and Discharge time): FormatCells, Custom, then I select h:mm
The data still didn’t populate….Iclicked on one of the time cells, and it displayed 11:50, when I doubledclicked on it, it then displayed 11:50:00 AM. When I did this for each timecell, then my data populated in the macro.
I don’t know why I have to double clickon each cell with a time for the new format (h:mm) to work? Any idea why thisis happening? Is there something I can do to prevent this from happening?