adding cells based on date and text

dannr

New Member
Joined
May 17, 2006
Messages
7
I know how to use sum product based on Date and Character strings in an array, but now I want to add numbers. For example, I want to calculate all the employee hours entered for July 2007

employee date hours
chuck 07/01/2007 3.50
chuck 07/04/2007 6.75
maggy 07/04/2007 5.0

so maggy should be 5.0 and chuck should be 10.25
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Hi,

Like this:
Book2
ABCDEF
1Chuck01/07/20073.5Chuck10.25
2Chuck04/07/20076.75Maggy5
3Maggy04/07/20075
4Maggy01/08/20077
Sheet3


Dom
 
Upvote 0
Hi and welcome to the board!! Have you considered a Pivot Table? It would turn this
Code:
  A        B        C     
1 employee date     hours 
2 chuck    7/1/2007 3.5   
3 chuck    7/4/2007 6.75  
4 maggy    7/4/2007 5     
5 Maggy    8/1/2007 3.5   
6 chuck    8/2/2007 4     

Sheet2

[Table-It] version 07 by Erik Van Geit
into this
Code:
   E            F        G     
 5 Sum of hours                
 6 date         employee Total 
 7 Jul          chuck    10.25 
 8              maggy    5     
 9 Jul Total             15.25 
10 Aug          chuck    4     
11              maggy    3.5   
12 Aug Total             7.5   
13 Grand Total           22.75 

Sheet2

[Table-It] version 07 by Erik Van Geit

HTH
lenze
 
Upvote 0
Thanks everyone for your help! I'll also try a pivot table. If I select "sum" or "count" it may add everything up nicely, but sometimes pivot tables are not smart enough to read your mind! I like SUMPRODUCT cause I can go straight to what I want
 
Upvote 0

Forum statistics

Threads
1,214,568
Messages
6,120,272
Members
448,953
Latest member
Dutchie_1

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top