COUNTIFS with multiple OR conditions

Verno2021

New Member
Joined
Jan 7, 2022
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Hi there,

I hope you can help me as I have been struggling with this issue for weeks.

I am handling data for an insurance provider package supplier company. One of our company's providers in particular is complicated as there are several possible outcomes of a customers' journey. I have been brought on by the company to organise, and see what is happening our customers and their payments.

The sheet is virtually finished but I am struggling with a couple of columns. One column needs to tell us how many customers have cancelled their policy after one payment, and another column needs to tell us how many customers have cancelled their policy after second payment. This does need to be automated as there more data entries to make by the month, so the idea is that when data is entered in the first table, we get a tally in a second table.

The first column needs recognise when there is an entry in the Cancellation Confirmation Date column, when there is a value greater than 0 in the first month, and then checks if there is a 0 or no entry in the next months' columns then get counted in the tally.

The second column I am having problems with (tallying up how many customers cancel their policy after two payments) is to be formulated almost the same. Recognise when their is an entry in the Cancellation Confirmation Date column, there is a value greater than 0 in the first month column and the second month column, and that there is a 0 or no entry in the next months' columns.

The 0 condition is in case a 0 is entered in the next upcoming months. As £0 is £0 obviously we need to be aware of it.

Up to now, I have tried

=SUM(COUNTIFS(L4:L37,"<>",M4:M37,">0",N4:N37,{"",0},O4:O37,{"";0},P4:P37,{"";0},Q4:Q37,{"";0},R4:R37,{"";0},S4:S37,{"";0},T4:T37,{"";0},U4:U37,{"";0},V4:V37,{"";0},W4:W37,{"";0},X4:X37,{"";0}))

for cancellation after one payment

=SUM(COUNTIFS(L4:L37,"<>",M4:M37,">0",N4:N37,">0",O4:O37,{"";0},P4:P37,{"";0},Q4:Q37,{"";0},R4:R37,{"";0},S4:S37,{"";0},T4:T37,{"";0},U4:U37,{"";0},V4:V37,{"";0},W4:W37,{"";0},X4:X37,{"";0}))

for cancellation after second payment.

I then learnt that OR conditions can only handle two separate OR conditions. So I have tried this

=SUMPRODUCT(ISNUMBER(MATCH(N4:N37,{"";0},0))* ISNUMBER(MATCH(O4:O37,{"";0},0))* ISNUMBER(MATCH(P4:P37,{"";0},0))* ISNUMBER(MATCH(Q4:Q37,{"";0},0))* ISNUMBER(MATCH(R4:R37,{"";0},0))* ISNUMBER(MATCH(S4:S37,{"";0},0))* ISNUMBER(MATCH(T4:T37,{"";0},0)) * ISNUMBER(MATCH(U4:U37,{"";0},0))* ISNUMBER(MATCH(V4:V37,{"";0},0))* ISNUMBER(MATCH(W4:W37,{"";0},0))* ISNUMBER(MATCH(X4:X37,{"";0},0)))

but COUNTIFS doesn't seem to be combined with this formula, yet I need the COUNTIFS really because the first two/three conditions to be met are not OR condition related.

There must be a clever way round this. Please help.

Thank you ever so much guys.
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
i understand that the data you are working with might be sensitive, can you share an altered example of the data you are working with?
might be easier to come up with a solution.
 
Upvote 0
i understand that the data you are working with might be sensitive, can you share an altered example of the data you are working with?
might be easier to come up with a solution.
Hi ExcelLoki,

I have removed sensitive data. Thank you so much for wanting to take a look at it. This is really appreciated. Really, you only need to be concerned with the second and third image as this holds the columns mentioned in my question.

1641591920869.png


1641591959717.png


1641591998920.png


I am sorry if this is not helpful. I have tried operating the "Upload Mini-sheet" but it does nothing when I try opening it after downloading.

Again, thank you so much.
 
Last edited by a moderator:
Upvote 0
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: COUNTIFS with multiple OR conditions
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0
if you're able to add a column here's a simple solution
-------------------
month 1month 2month 3month 4month 5month 6Total monthsworst case scenario (limbo phase plus cancellations)customers continuing with policy (after still to be paid, unpaid, bad debt)customers cancelling policy (after still to be paid, unpaid, bad debt)customers cancelled after one paymentcustomers canceled after two payments
cancellation confirmation datepaid octpaid novpaid decpaid janpaid febpaid marchmonths paid31
0
10/1/202116.311
12/1/202132.6332.632
1/1/202236.5336.5336.533
15.71
10/1/202131.421
32.631
31.411
10/1/202132.631
0

----------
total months
=COUNTIF(M4:R4,">0")

customers cancelled after one payment
=COUNTIFS(L4:L13,"<>",S4:S13,"1")

customers canceled after two payments
=COUNTIFS(L4:L13,"<>",S4:S13,"2")
 
Upvote 0

Forum statistics

Threads
1,214,853
Messages
6,121,935
Members
449,056
Latest member
denissimo

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