Forumla for find total number of occurences, and then summing the value from the another cell

PlusBob

New Member
Joined
Feb 16, 2016
Messages
15
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
  2. MacOS
  3. Mobile
  4. Web
I have a column with employee names, and a column with hours they worked. There's a list of names, and next to the list I want it the result to be the total added hours for each name. Can you help?

In the example, Column D (Total Hours per Employee) is where I wish the formula to be:
A
NAME
B
HOURS
C
List of Employees
D
Total hours per Employee
John
1
Bob
2
Bob
2
John
5
John
1
Mark
2
John
3
Mark
2

<tbody>
</tbody>
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Well that easy! Here I'm trying to be all complex with it. Thank you Marcelo Branco!
 
Upvote 0
I'm really not trying have anyone do my work :oops:.


Here's the formula that I have to count total number of entries for the month of October:
=SUMPRODUCT(--(MONTH('Timecard Detail FY16'!H2:H7601)=10))

And this is for total number of hours per employee
=SUMIF('Timecard Detail FY16'!E2:E7601,M3,'Timecard Detail FY16'!M2:M7601)

Sheet: 'Timecard Detail FY16' contains that data. Second sheet has the stats.

I'm trying to combine the two, so that I can show total number of hours per employee per month.
E
Name
H
date (mm/dd/yyyy)
M
Hours per day
Stats Sheet
M
List of Names
Total # of Hrs/Emp/Month
October
NovemberDecember
John10/01/20152Bob6
Bob10/01/20151John3
Mark10/01/20154Mark7
John10/02/20151
Bob10/02/20155
Mark10/02/20153

<tbody>
</tbody>
 
Upvote 0
Maybe something like this (adjust the ranges)


A
B
C
D
E
F
G
H
1
Name​
date (mm/dd/yyyy)​
Hours per day​
Year​
Month​
Name​
Hours​
2
John​
09/30/2015​
5​
2015​
10​
Bob​
6​
3
Bob​
09/30/2015​
5​
John​
3​
4
Mark​
09/30/2015​
5​
Mark​
7​
5
John​
10/01/2015​
2​
6
Bob​
10/01/2015​
1​
7
Mark​
10/01/2015​
4​
8
John​
10/02/2015​
1​
9
Bob​
10/02/2015​
5​
10
Mark​
10/02/2015​
3​

Formula in H2 copied down
=SUMPRODUCT(--($A$2:$A$10=G2),--(YEAR($B$2:$B$10)=$E$2),--(MONTH($B$2:$B$10)=$F$2),$C$2:$C$10)

M.
 
Upvote 0

Forum statistics

Threads
1,216,119
Messages
6,128,944
Members
449,480
Latest member
yesitisasport

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