Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Calculation of peak / off peak hrs v2



I am trying to write a macro that will automatically calculate and display,
in seperate columns, the number of hours worked in both Peak (09:00 to
19:00 - Mon - Fri) and off peak (19:01 to 08:59 Mon - Fri and all day
Saturday and Sunday), as well as to split those between Invoiced and No
Charge hours. These hours are then to be subtotalled by Suite.
The data I am working from looks as follows:

Date Suite RateCardItem Status Start End
22/07/2004 Suite1 Product1 Invoiced 10:00 11:00
21/07/2004 Suite1 Product1 Invoiced 18:30 19:30
20/07/2004 Suite1 Product2 No Charge 17:00 18:00
03/07/2004 Suite1 Product2 Invoiced 16:30 19:15
02/07/2004 Suite1 Product2 Invoiced 14:00 18:00
01/07/2004 Suite1 Product2 Invoiced 09:00 11:00
30/07/2004 Suite2 Product1 Invoiced 10:00 10:15
29/07/2004 Suite2 Product1 Invoiced 17:00 19:30
13/07/2004 Suite2 Product2 No Charge 17:00 21:00
09/07/2004 Suite2 Product2 Invoiced 12:00 19:00
09/07/2004 Suite2 Product2 Invoiced 08:00 11:00
08/07/2004 Suite2 Product2 Invoiced 09:00 13:30
08/07/2004 Suite2 Product2 Invoiced 16:30 20:30

The output should look something like this:

Date Suite RateCardItem Status Start End
Actual Peak Off Peak No Charge No Charge

Hrs Hrs Hrs Peak Hrs Off Peak Hrs
22/07/2004 Suite1 Product1 Invoiced 10:00 11:00 1.0
1.0
21/07/2004 Suite1 Product1 Invoiced 18:30 19:30 1.0
0.5 0.5
20/07/2004 Suite1 Product2 No Charge 17:00 18:00 1.0
1.0
03/07/2004 Suite1 Product2 Invoiced 16:30 19:15 2.75
2.75
02/07/2004 Suite1 Product2 Invoiced 14:00 18:00 4.0
4.0
01/07/2004 Suite1 Product2 Invoiced 09:00 11:00 2.0
2.0
Suite1 Total
11.75 7.5 0.5 1.0 2.75
30/07/2004 Suite2 Product1 Invoiced 10:00 10:15 0.25
0.25
29/07/2004 Suite2 Product1 Invoiced 17:00 19:30 2.5
2.0 0.5
13/07/2004 Suite2 Product2 No Charge 17:00 21:00 4.0
2.0 2.0
09/07/2004 Suite2 Product2 Invoiced 12:00 19:00 7.0
7.0
09/07/2004 Suite2 Product2 Invoiced 08:00 11:00 3.0
2.0 1.0
08/07/2004 Suite2 Product2 Invoiced 09:00 13:30 4.5
4.5
08/07/2004 Suite2 Product2 Invoiced 16:30 20:30 4.0
2.5 1.5
Suite2 Total
25.25 18.25 3.0 2.0 2.0

Any help would be greatly appreciated.
Thanks in advance.
Craig


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to find values before plot peak? patryk Charts and Charting in Excel 0 April 16th 10 05:51 PM
Calculating a peak value in a range of cells Joneru Excel Discussion (Misc queries) 1 November 5th 08 08:00 AM
Peak call times/hours Ber Excel Worksheet Functions 2 July 14th 08 10:26 AM
width at the hlaf maximun peak Mauro Charts and Charting in Excel 0 March 27th 08 11:56 PM
Calculation of peak and off peak hours Craig[_19_] Excel Programming 2 November 30th 05 09:28 PM


All times are GMT +1. The time now is 01:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"