COUNTIF w/ greater than & name match

DaRTH KiRo

New Member
Joined
Jan 24, 2018
Messages
39
Office Version
  1. 2016
Platform
  1. Windows
I am needing to COUNTIF column B on "Data" sheet is greater than column C on "Data" sheet, if the name in column A of "Totals" sheet matches the name from column A on "Data" sheet. The Data sheet has multiple rows with the same name that need to have the values in B and C checked.

Data Sheet:
EmployeeWinsLosses
Name1
5​
2​
Name2
2​
4​
Name3
1​
8​
Name1
8​
5​
Name1
5​
1​
Name3
6​
5​

Totals Sheet:
EmployeeTotal
Name1
Name2
Name3
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Please update your account details to indicate which version of Excel you are running.
Different solutions to problems often depend on the version you're running.

One way:

Book1
AB
1EmployeeTotal
2Name13
3Name20
4Name31
Totals
Cell Formulas
RangeFormula
B2:B4B2=SUMPRODUCT((Data!A2:A7=A2)*(Data!B2:B7>Data!C2:C7))
 
Upvote 0
Thank you, I did update my profile and this is working now! However, I am now trying to SUMPRODUCT if both column B and C on the Data sheet are equal and I'm running into an issue of it counting the blanks. I've tried using NOT(ISBLANK()) and that didn't seem to work, do you have any thoughts on what I could add to fix that?
 
Upvote 0
Please update your account details to indicate which version of Excel you are running.
Different solutions to problems often depend on the version you're running.

One way:

Book1
AB
1EmployeeTotal
2Name13
3Name20
4Name31
Totals
Cell Formulas
RangeFormula
B2:B4B2=SUMPRODUCT((Data!A2:A7=A2)*(Data!B2:B7>Data!C2:C7))
Thank you, I did update my profile and this is working now! However, I am now trying to SUMPRODUCT if both column B and C on the Data sheet are equal and I'm running into an issue of it counting the blanks. I've tried using NOT(ISBLANK()) and that didn't seem to work, do you have any thoughts on what I could add to fix that?
 
Upvote 0
Please show a few examples of all of the conditions you want and the expected results. Please use XL2BB to illustrate.

Do you mean this?

Book1
ABC
1EmployeeTotal W>LTotal W=L
2Name130
3Name200
4Name311
Totals
Cell Formulas
RangeFormula
B2:B4B2=SUMPRODUCT((Data!$A2:$A10=$A2)*(Data!$B2:$B10>Data!$C2:$C10))
C2:C4C2=SUMPRODUCT((Data!$A2:$A10=$A2)*(Data!$B2:$B10=Data!$C2:$C10))
 
Upvote 0

Forum statistics

Threads
1,224,752
Messages
6,180,742
Members
452,996
Latest member
nelsonsix66

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