ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   count rows that meet certain criteria (https://www.excelbanter.com/excel-discussion-misc-queries/156094-count-rows-meet-certain-criteria.html)

klp

count rows that meet certain criteria
 
I need a formula that will total all the payroll, overtime and training hours
for B and C in the below example:

A B C
1 payroll 15 8
2 overtime 5 0
3 payroll 6 22
4 training 4 4
5 training 8 11


payroll B = 21
overtime B = 5
training B = 12
payroll C = 30
overtime C = 0
training C = 15

i'm sure there is some easy formula that can do this, but i can't think of
one.
any suggestions?

thanks

JE McGimpsey

count rows that meet certain criteria
 
Easiest would be to create a Pivot Table.

The harder way would be to use individual formulae:

payroll B: =SUMIF(A1:A5,"payroll",B1:B5)
payroll C: =SUMIF(A1:A5,"payroll",C1:C5)

etc.

In article ,
klp wrote:

I need a formula that will total all the payroll, overtime and training hours
for B and C in the below example:

A B C
1 payroll 15 8
2 overtime 5 0
3 payroll 6 22
4 training 4 4
5 training 8 11


payroll B = 21
overtime B = 5
training B = 12
payroll C = 30
overtime C = 0
training C = 15

i'm sure there is some easy formula that can do this, but i can't think of
one.
any suggestions?

thanks


Stephen C

count rows that meet certain criteria
 
payroll B =SUMIF($A$1:$A$5,"payroll",$B$1:$B$5)
overtime B =SUMIF($A$1:$A$5,"overtime",$B$1:$B$5)
training B =SUMIF($A$1:$A$5,"training",$B$1:$B$5)
payroll C =SUMIF($A$1:$A$5,"payroll",$C$1:$C$5)
overtime C =SUMIF($A$1:$A$5,"overtime",$C$1:$C$5)
training C =SUMIF($A$1:$A$5,"training",$C$1:$C$5)

"klp" wrote:

I need a formula that will total all the payroll, overtime and training hours
for B and C in the below example:

A B C
1 payroll 15 8
2 overtime 5 0
3 payroll 6 22
4 training 4 4
5 training 8 11


payroll B = 21
overtime B = 5
training B = 12
payroll C = 30
overtime C = 0
training C = 15

i'm sure there is some easy formula that can do this, but i can't think of
one.
any suggestions?

thanks


klp

count rows that meet certain criteria
 
thanks, the SUMIF formula worked perfectly!
unfortunatly the pivot table doesn't help in this situation.

"JE McGimpsey" wrote:

Easiest would be to create a Pivot Table.

The harder way would be to use individual formulae:

payroll B: =SUMIF(A1:A5,"payroll",B1:B5)
payroll C: =SUMIF(A1:A5,"payroll",C1:C5)

etc.

In article ,
klp wrote:

I need a formula that will total all the payroll, overtime and training hours
for B and C in the below example:

A B C
1 payroll 15 8
2 overtime 5 0
3 payroll 6 22
4 training 4 4
5 training 8 11


payroll B = 21
overtime B = 5
training B = 12
payroll C = 30
overtime C = 0
training C = 15

i'm sure there is some easy formula that can do this, but i can't think of
one.
any suggestions?

thanks




All times are GMT +1. The time now is 10:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com