COUNTIFS including

ollyhughes1982

Well-known Member
Joined
Nov 27, 2018
Messages
793
Office Version
  1. 365
Platform
  1. MacOS
Hi all,

I have the following formula in D14:

Excel Formula:
=IFERROR(IF(B14="","",COUNTIFS('All Completed Runs'!$C$4:$C$2003,"*"&A14&"*",'All Completed Runs'!$D$4:$D$2003,"South Africa",'All Completed Runs'!$FL$4:$FL$2003,"<>1")),"")

Screenshot 2024-01-24 at 22.29.48.png


This should read 1, as I have completed an event (venue) which includes Walvis in its name on one occasion, as per B14. I know why this isn't working, because Walvis Bay parkrun is in Namibia and at the moment my formula is only catering for events in South Africa. Is there any way that I can add in to the formula some sort of 'OR' functionality so that it picks up events that have been completed within either Eswatini, Namibia or South Africa, rather than just in South Africa, as it is at present? Guessing it might be some sort of SUMPRODUCT solution?

Effectively, I need to have the 'All Completed Runs'!$D$4:$D$2003,"South Africa" part just add in Eswatini and Namibia as well. Is there a way to do this within COUNTIFS?

Thanks in advance,

Olly.
 
Last edited by a moderator:

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Apologies, I believe I have now resolved this: I added in the multiple criterion within { } brackets and enclosed the COUNTIFS within a SUM function. Please see below:

Excel Formula:
=IFERROR(IF(B14="","",SUM(COUNTIFS('All Completed Runs'!$C$4:$C$2003,"*"&A14&"*",'All Completed Runs'!$D$4:$D$2003,{"Eswatini","Namibia","South Africa"},'All Completed Runs'!$FL$4:$FL$2003,"<>1"))),"")

Thanks again.
 
Last edited by a moderator:
Upvote 0
Solution

Forum statistics

Threads
1,223,863
Messages
6,175,052
Members
452,607
Latest member
OoM_JaN

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