Extend COUNTIFS

Bandito1

Board Regular
Joined
Oct 18, 2018
Messages
234
Office Version
  1. 2016
Platform
  1. Windows
Hello,

I use the following formula to count the incoming files that are cancelled;


=COUNTIFS('[Registratie review.xlsx]2016-2022'!$H:$H;">="&B12;'[Registratie review.xlsx]2016-2022'!$F:$F;"Cancelled";'[Registratie review.xlsx]2016-2022'!$H:$H;"<="& EOMONTH(B12;0))

The problem;

The reason is never alone "Cancelled"

It can be Cancelled because of A
Cancelled because of C

And so on.

How can i make it that it only looks to the word Cancelled and count those what ever is after cancelled?
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
How about
Excel Formula:
=COUNTIFS('[Registratie review.xlsx]2016-2022'!$H:$H;">="&B12;'[Registratie review.xlsx]2016-2022'!$F:$F;"Cancelled*";'[Registratie review.xlsx]2016-2022'!$H:$H;"<="& EOMONTH(B12;0))
 
Upvote 0
Solution
Switch to sumproduct, that handles non-ranges
MrExcelPlayground13.xlsx
BCDEFGH
12Okay10/16/2022
2Cancelled for A10/16/2022
3Okay10/16/2022
4Cancelled for B10/16/2022
5Good10/16/2022
6starting soon10/16/2022
7Cancelled for A11/1/2022
8Cancelled11/1/2022
9Nice11/1/2022
10Stop11/1/2022
11
1210/15/2022
Sheet13
Cell Formulas
RangeFormula
B1B1=SUMPRODUCT(--(H1:H10>=B12),--(H1:H10<=EOMONTH(B12,0)),--(LEFT(F1:F10,9)="Cancelled"))
 
Upvote 0
is Sumproduct better than COUNTIFS?

Got some problems understanding the SUMPRODUCT formula
 
Upvote 0
Yes, it seems like it works.

One problem that I'm facing, which makes it hard to test;

Im pulling data from "Registratie Review".
This file is password protected.

When I close this file all data in the file that pulls data from Registratie Review turns to #VALUE

Is this because the files is password protected?
Is their a way to solve this?
 
Upvote 0
Countifs does not work with a closed file, you would need to switch to sumproduct instead
 
Upvote 0

Forum statistics

Threads
1,215,391
Messages
6,124,673
Members
449,178
Latest member
Emilou

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