Grouping Time in Pivots.

G

GEM

I have a large DB, this is a small example,

Client Date Time
1 5/31/2010 9:32:43 AM
1 5/31/2010 9:34:21 AM
1 5/31/2010 10:51:39 AM
3 5/31/2010 11:10:13 PM
3 5/31/2010 03:13:10 PM
5 5/31/2010 05:42:01 PM
5 5/31/2010 06:45:43 PM
2 5/31/2010 06:47:11 PM
4 5/31/2010 08:50:31 PM

I would like to create a pivot table that will count how many times each
client placed an order between these time groups,

9:00 am - 4:00 pm
4:01 pm - 6:00 pm
6:01 pm - 11:59 pm

Each entry is one order placed....
 
G

Gary Brown

Assuming Column C contains the Time, use a helper column with the following
formula...

=IF(AND(C2>=0.375,C2<=0.666667),1,IF(AND(C2>0.666667,C2<=0.75),2,IF(C2>0.75,3,0)))

A result of 1 = 1st shift of 9am to 4 pm
A result of 2 = 2nd shift of 4:01 pm to 6 pm
A result of 3 = 3rd shift of 6:01 pm to midnight
A result of 0 = from 12:01 am to 9:59 am
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top