Need to determine all rows with common ID value that don't contain a specific string value

jameskbw

New Member
Joined
Feb 8, 2023
Messages
10
Office Version
  1. 365
Platform
  1. Windows
I have data that represent a child parent relationship from Salesforce - account and contact. Every row contains an account id which would be the value to "group by."

Each row contains several contact specific fields, and also the account id. The goal is to find all accounts (or at the account level) where none of the contacts contain the string "Statement Delivery" in the Contact Role field / column. E.G. if there are 20 contacts that all have the same account id value, and none of them contain "Statement Delivery" in the contact role column, I want to flag or tag that account some how.

This is a multi select picklist field so strings are separated by ;

I'm not even sure where to start, but hoping someone can point me in the right direction. Any help would be greatly appreciated.
2023-02-08 11_28_05-Contacts and Accounts contact role-2023-02-07-15-12-18.xlsx - Excel.png
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
the words/codes in the Let statment are:
header, the header row of column titles.
data, the entire data being sorted
lfs look for string (that you want to exclude)
cr, the contact role column
ai, account ID column
excludes, the records that need to be excluded (matched to the look for string)
includes, the records that do not match the look for string
body, is the data after it is filtered.
Thank you for the explanation. I tried to apply to my larger dataset and I couldn't get it to work. I think this problem may just be over my basic excel skills, even with help.
 
Upvote 0
ah,we will get it. I'll try to configure that statement to your column letters, but you'll need to adjust your row numbers.

What column is contact ID in? It is not visible in your pictures. It is only in the miniworkbook with columns A,B,C.
 
Last edited:
Upvote 0
I appreciate all the help. I was able to figure out a more straight forward solution and I'll post in case it's useful to anyone else.

Basic steps were:
  1. Get list of all unique account id's in new worksheet.
  2. Use the following formula to search for "Statement Delivery" in Contact Role Column and return 1 if found, 0 otherwise.
    1. =IF(ISNUMBER(SEARCH("Statement Delivery",B2)),1,0)
  3. In the new sheet with unique accounts, use formula to sum all values using the account as the key.
    1. =SUMIF('Contacts and Accounts contact r'!C:C,Sheet1!A2,'Contacts and Accounts contact r'!D:D)
Contacts and Accounts contact role cleaned.xlsx
ABCD
1contactContact Roleaccount
2name001Billing; Statement Delivery; Technical; Non-Operational; OperationsAccount0011
3name002Non-Operational; International ComplianceAccount0020
4name003Non-OperationalAccount0020
5name004Non-OperationalAccount0020
6name005Non-OperationalAccount0020
7name006Non-OperationalAccount0020
8name007Non-OperationalAccount0020
9name008Non-OperationalAccount0020
10name009Non-OperationalAccount0020
11name010Non-OperationalAccount0020
12name011Non-OperationalAccount0020
13name012Non-OperationalAccount0020
14name013Non-OperationalAccount0020
15name014Non-OperationalAccount0020
16name015Non-OperationalAccount0020
17name016Non-OperationalAccount0020
18name017Non-OperationalAccount0020
19name018Non-OperationalAccount0020
20name019Non-OperationalAccount0020
21name020Non-OperationalAccount0020
22name021Non-OperationalAccount0020
23name022Non-Operational; International ComplianceAccount0020
24name023Non-OperationalAccount0020
25name024Non-OperationalAccount0020
26name025BillingAccount0020
27name026Non-OperationalAccount0020
28name027BillingAccount0030
29name028Non-OperationalAccount0030
30name029Non-OperationalAccount0030
31name030Non-OperationalAccount0030
32name031Non-OperationalAccount0030
33name032Non-OperationalAccount0030
34name033Non-OperationalAccount0030
35name034Non-OperationalAccount0030
36name035Non-OperationalAccount0040
37name036Non-OperationalAccount0040
38name037Non-OperationalAccount0050
39name038Non-OperationalAccount0050
40name039Non-OperationalAccount0050
41name040Non-OperationalAccount0050
42name041Non-OperationalAccount0050
43name042Non-OperationalAccount0050
44name043Non-OperationalAccount0060
45name044Non-OperationalAccount0070
46name045Non-OperationalAccount0070
47name046Non-OperationalAccount0070
48name047Non-OperationalAccount0070
49name048Non-OperationalAccount0070
50name049Non-OperationalAccount0070
51name050Non-OperationalAccount0080
52name051Billing; Statement DeliveryAccount0091
53name052Non-OperationalAccount0100
54name053Non-OperationalAccount0100
55name054Non-OperationalAccount0100
56name055Non-OperationalAccount0100
57name056Non-OperationalAccount0100
58name057Non-OperationalAccount0110
Contacts and Accounts contact r
Cell Formulas
RangeFormula
D2:D58D2=IF(ISNUMBER(SEARCH("Statement Delivery",B2)),1,0)


Contacts and Accounts contact role cleaned.xlsx
AB
1account
2Account0011
3Account0020
4Account0030
5Account0040
6Account0050
7Account0060
8Account0070
9Account0080
10Account0091
11Account0100
12Account0110
13Account0120
14Account0130
15Account0140
16Account0150
17Account0160
18Account0171
Sheet1
Cell Formulas
RangeFormula
B2:B18B2=SUMIF('Contacts and Accounts contact r'!C:C,Sheet1!A2,'Contacts and Accounts contact r'!D:D)
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,180
Members
452,615
Latest member
bogeys2birdies

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