COUNTIFS function not working correctly?

smc5917

New Member
Joined
Sep 15, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi there,

I am having some trouble using the COUNTIFS function. I want to determine whether a certain combination of responses occurs in cell pairs. For example:

= SUM(COUNTIFS('P2'!B7,{"Sometimes","Often","Always"}, 'P2'!C7,{"Sometimes","Often","Always"}))

When I try the formula in full, like the above, I get an output of 0 when it should really be 1. When I break the formula down into SUM(COUNTIFS('P2'!B7,{"Sometimes","Often","Always"})) and SUM(COUNTIFS('P2'!C7,{"Sometimes","Often","Always"})) - I get an output of 1 for each.

The full formula has worked elsewhere in my spreadsheet, so I'm really confused as to what's happening. I have checked for spaces etc, and it all came back fine.

Any help would be very much appreciated!
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
are you able to share a sample of your sheet so we can see what you're working with?
suggest using
 
Upvote 0
When using two arrays you need to change the separator in one of them like
Excel Formula:
= SUM(COUNTIFS('P2'!B7,{"Sometimes","Often","Always"}, 'P2'!C7,{"Sometimes";"Often";"Always"}))
 
Upvote 0
Solution
Unfortunately not able to set up XL2BB as on a work device with limited permissions.
I have attached an example
When using two arrays you need to change the separator in one of them like
Excel Formula:
= SUM(COUNTIFS('P2'!B7,{"Sometimes","Often","Always"}, 'P2'!C7,{"Sometimes";"Often";"Always"}))
Wow - thank you so much for such a quick, clear and helpful reply. That's solved it :)
 
Upvote 0
Glad to help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,932
Messages
6,122,331
Members
449,077
Latest member
jmsotelo

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