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
 

Some videos you may like

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Domski

Well-known Member
Joined
Jan 18, 2005
Messages
7,292
Hi,

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


Dom
 

lenze

Legend
Joined
Feb 18, 2002
Messages
13,690
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
 

dannr

New Member
Joined
May 17, 2006
Messages
7
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
 

Watch MrExcel Video

Forum statistics

Threads
1,122,809
Messages
5,598,202
Members
414,218
Latest member
speedbit

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
Top