How to count the row if criteria for 2 columns match

mcjames

New Member
Joined
Apr 18, 2013
Messages
4
I'm working on a spreadsheet that records the customer's name, acct#, the employee helping them, payments made the day of service, payments received for an acct, and the payment method. On the summary page, I am trying to break down the payments at time of service by employee. I’m currently using the “COUNT” formula, which is calculating how many times the employee's initials show up, but not specifically the “payments made the day of service.”

This is an example of my spreadsheet. I'm only displaying the columns I need the formula to pull from.

Column B Column F Column G
employee day of service received on acct
BK 100.00 x
BK 200.00 x
BK x 150.00
NG 50.00
NG x 50.00
PK x 150.00
DT 100.00
DD x 125.00
DD 150.00

So with this example, my results should tally:

BK=2
NG=1
PK= 0
DT=1
DD=1

I'm pretty sure I need to be using the "COUNT" function, but just can't figure out how to enter the formula. Also, Column B, with the employee's initials is a drop down list. Not sure if it makes a difference or not.
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
try below for BK

=SUMPRODUCT((F1:F9<>"x")*(B1:B9="BK"))


or if you using excel 2007 or later then below one can be same

=COUNTIFS(B:B,"BK",F:F,"<>X")
 
Last edited:
Upvote 0
the "X" listed in my example is actually going to be a blank cell, I just didn't know how else to show that in this message box. Do I still enter "X" for the blank spots? or will there have to be a value for the formula to work?
 
Upvote 0
the "X" listed in my example is actually going to be a blank cell, I just didn't know how else to show that in this message box. Do I still enter "X" for the blank spots? or will there have to be a value for the formula to work?
 
Upvote 0
Try below
=SUMPRODUCT((F:F<>"")*(B:B="BK"))

OR

=countifs(b:b,"bk")-countifs(b:b,"bk",f:f,"")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,929
Messages
6,127,743
Members
449,402
Latest member
jvivo3

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