#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default total

Dear All
Please I want formula or VB macro, to sub-total the no. of hours when Emp.ID
& date is matching eg. All Emp#.ID equal to 116 with date equal to 1/3/10 etc.
Thanks

Remarks my data not include any empty raw

Working data as below
Date Emp #.ID No. of Hours
01/03/10 116 4.00
01/03/10 116 2.00
01/03/10 116 5.00
01/03/10 116 5.00
03/03/10 116 11.00
04/03/10 116 11.00
28/03/10 116 11.00
01/03/10 120 2.00
01/03/10 120 5.00
01/03/10 120 4.00
02/03/10 120 9.00
02/03/10 120 2.00
03/03/10 120 11.00
04/03/10 120 11.00
23/03/10 120 11.00
25/03/10 120 6.00
25/03/10 120 5.00
01/03/10 131 11.00
02/03/10 131 11.00
03/03/10 131 6.00
03/03/10 131 5.00
16/03/10 131 11.00
25/03/10 131 2.00
25/03/10 131 9.00
04/03/10 150 5.00
04/03/10 150 2.00
04/03/10 150 4.00
14/03/10 150 9.00
15/03/10 150 2.00
15/03/10 150 9.00
16/03/10 150 2.00
16/03/10 150 9.00
17/03/10 150 9.00
17/03/10 150 2.00

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default total

With date in cell D1 and Emp.ID in cell E1 try the below formula

=SUMPRODUCT((A2:A100=D1)*(B2:B100=E1)*C2:C100)

--
Jacob (MVP - Excel)


"Yousoft" wrote:

Dear All
Please I want formula or VB macro, to sub-total the no. of hours when Emp.ID
& date is matching eg. All Emp#.ID equal to 116 with date equal to 1/3/10 etc.
Thanks

Remarks my data not include any empty raw

Working data as below
Date Emp #.ID No. of Hours
01/03/10 116 4.00
01/03/10 116 2.00
01/03/10 116 5.00
01/03/10 116 5.00
03/03/10 116 11.00
04/03/10 116 11.00
28/03/10 116 11.00
01/03/10 120 2.00
01/03/10 120 5.00
01/03/10 120 4.00
02/03/10 120 9.00
02/03/10 120 2.00
03/03/10 120 11.00
04/03/10 120 11.00
23/03/10 120 11.00
25/03/10 120 6.00
25/03/10 120 5.00
01/03/10 131 11.00
02/03/10 131 11.00
03/03/10 131 6.00
03/03/10 131 5.00
16/03/10 131 11.00
25/03/10 131 2.00
25/03/10 131 9.00
04/03/10 150 5.00
04/03/10 150 2.00
04/03/10 150 4.00
14/03/10 150 9.00
15/03/10 150 2.00
15/03/10 150 9.00
16/03/10 150 2.00
16/03/10 150 9.00
17/03/10 150 9.00
17/03/10 150 2.00

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default total

Thank you for your respond but the result for this formula is wrong,

"Jacob Skaria" wrote:

With date in cell D1 and Emp.ID in cell E1 try the below formula

=SUMPRODUCT((A2:A100=D1)*(B2:B100=E1)*C2:C100)

--
Jacob (MVP - Excel)


"Yousoft" wrote:

Dear All
Please I want formula or VB macro, to sub-total the no. of hours when Emp.ID
& date is matching eg. All Emp#.ID equal to 116 with date equal to 1/3/10 etc.
Thanks

Remarks my data not include any empty raw

Working data as below
Date Emp #.ID No. of Hours
01/03/10 116 4.00
01/03/10 116 2.00
01/03/10 116 5.00
01/03/10 116 5.00
03/03/10 116 11.00
04/03/10 116 11.00
28/03/10 116 11.00
01/03/10 120 2.00
01/03/10 120 5.00
01/03/10 120 4.00
02/03/10 120 9.00
02/03/10 120 2.00
03/03/10 120 11.00
04/03/10 120 11.00
23/03/10 120 11.00
25/03/10 120 6.00
25/03/10 120 5.00
01/03/10 131 11.00
02/03/10 131 11.00
03/03/10 131 6.00
03/03/10 131 5.00
16/03/10 131 11.00
25/03/10 131 2.00
25/03/10 131 9.00
04/03/10 150 5.00
04/03/10 150 2.00
04/03/10 150 4.00
14/03/10 150 9.00
15/03/10 150 2.00
15/03/10 150 9.00
16/03/10 150 2.00
16/03/10 150 9.00
17/03/10 150 9.00
17/03/10 150 2.00

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
Duplicate Running Total Grand Total In Pivot Table Mathew P Bennett[_2_] Excel Discussion (Misc queries) 1 August 17th 08 03:13 AM
Excel 2002 : Any single button to get sub total and grand total ? Mr. Low Excel Discussion (Misc queries) 2 May 22nd 07 08:46 AM
calculate count on 2006 total, 2005 total, etc... Amanda Deshotel Excel Worksheet Functions 6 September 28th 06 11:59 PM
Pivots - Auto calc % Sub total is of grand total VBA Noob Excel Discussion (Misc queries) 3 August 8th 06 08:46 PM
Adding Data Using Multiple Worksheets to Total into a Grand Total Lillie Excel Worksheet Functions 1 April 19th 05 08:34 PM


All times are GMT +1. The time now is 11:17 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"