IF statement across multiple customer records

dancepants

New Member
Joined
Jan 30, 2013
Messages
1
Office Version
  1. 2021
Platform
  1. Windows
Hi all

I have a customer dataset where each row represents a customer's subscription. Each customer can have one or more subscriptions. I would like to categorize each customer, based on the type and status of their subscriptions, into three groups: "Cancelled", "One time", or "Recurring".
"Cancelled" would be a customer where ALL of their subscriptions are cancelled
"One time" would be a customer that only has a One-time subscription that is active
"Recurring" would be a customer that has at least one Active and recurring subscription

Here's an example of the dataset:
Customer IDSubscription cancelled dateRecurring FrequencyOne-time only?
1005ActiveOne-timeOne-time
1006CancelledOne-timeRecurring
1006ActiveQuarterlyRecurring
1007CancelledQuarterlyCancelled
1008ActiveMonthlyRecurring
1008CancelledQuarterlyRecurring
1009CancelledMonthlyCancelled
1009CancelledOne-timeCancelled

First 3 columns are in my dataset, I need to create the 4th with an excel formula. So my question is, what formula could I use that looks across ALL customer records, and assigns the correct category based on multiple conditions?

Hopefully that's clear. Thanks everyone in advance
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
Hi,

Would this work for you:

Book3.xlsx
ABCD
1Customer IDSubscription cancelled dateRecurring FrequencyOne-time only?
21005ActiveOne-timeOne-time
31006CancelledOne-timeRecurring
41006ActiveQuarterlyRecurring
51007CancelledQuarterlyCancelled
61008ActiveMonthlyRecurring
71008CancelledQuarterlyRecurring
81009CancelledMonthlyOne-time
91009ActiveOne-timeOne-time
Sheet1051
Cell Formulas
RangeFormula
D2:D9D2=IF(COUNTIFS(A$2:A$9,A2,B$2:B$9,"Active",C$2:C$9,"<>One-time"),"Recurring",IF(COUNTIFS(A$2:A$9,A2,B$2:B$9,"Active",C$2:C$9,"One-time"),"One-time","Cancelled"))
 
Last edited:
Upvote 0
Thanks for updating your profile. (y)

Another option that you could try:

22 03 21.xlsm
ABCD
1Customer IDSubscription cancelled dateRecurring FrequencyOne-time only?
21005ActiveOne-timeOne-time
31006CancelledOne-timeRecurring
41006ActiveQuarterlyRecurring
51007CancelledQuarterlyCancelled
61008ActiveMonthlyRecurring
71008CancelledQuarterlyRecurring
81009CancelledMonthlyCancelled
91009CancelledOne-timeCancelled
101006ActiveMonthlyRecurring
Subs
Cell Formulas
RangeFormula
D2:D10D2=LET(ot,"One-time",x,"Cancelled",f,FILTER(C$2:C$10,(A$2:A$10=A2)*(B$2:B$10<>x),NA()),IFNA(IF(INDEX(FILTER(f,f<>ot,""),1)="",ot,"Recurring"),x))
 
Upvote 0

Forum statistics

Threads
1,223,712
Messages
6,174,031
Members
452,542
Latest member
Bricklin

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