Countifs not working

Gower1983

New Member
Joined
Jun 18, 2023
Messages
28
Office Version
  1. 365
Platform
  1. Windows
Hello,

I am doing some sports analysis for a project and I and trying to count number of appearances for players in any given season

To do this I am trying to use the countifs formula to count the number of player appearances as criteria one and season as criteria 2. But I keep getting a #value! error.

When I do the formula individually I get the results I expect but only when I combine them in countifs I then get the error.

Can anyone shed any light on why it will not work?
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Hi & welcome to MrExcel.

Can you post some sample data.
MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
Hi & welcome to MrExcel.

Can you post some sample data.
MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 

Attachments

  • Screenshot 2023-06-18 222106.png
    Screenshot 2023-06-18 222106.png
    75.5 KB · Views: 9
  • Screenshot 2023-06-18 222225.png
    Screenshot 2023-06-18 222225.png
    168.8 KB · Views: 8
Upvote 0
Try
Excel Formula:
=SUMPRODUCT((Database!$C$10:$C$1496=$I$1)*(Database!$S$10:$AH$1496=D2))
 
Upvote 0
Try
Excel Formula:
=SUMPRODUCT((Database!$C$10:$C$1496=$I$1)*(Database!$S$10:$AH$1496=D2))
That seems to have worked, thank you. Is there anything I can input so that when column D is black it returns 0?
 
Upvote 0
How about
Excel Formula:
=if(d2="",0,SUMPRODUCT((Database!$C$10:$C$1496=$I$1)*(Database!$S$10:$AH$1496=D2)))
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,276
Messages
6,124,007
Members
449,139
Latest member
sramesh1024

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