# Help with a formula

I have a credit card account that has additional card holder to the main account holder.
The transactions for each of the accounts are pulled into a single sheet.

Here’s the example sheet

How would I get to count the occurrence of the transaction(Walmart) if it shows on the additional card (named Visa Platinum Cashback xxx11040 [MS-TS] in the example) and the main card holder’s account?

So I want the count to show as
Visa Platinum Cashback xxx11040 [MS-TS] : 1
Visa Platinum Cashback xxx21000 [MS]: 0

So basically filter out the duplicate, which it is.
As the transaction was made by the additional card holder and not the main account holder.

Of course the count should be the exact opposite if the purchase wasn’t made by additional card holder.
The solution should take into account that both card could be used at the same store on the same date.

Then the count should be
Visa Platinum Cashback xxx11040 [MS-TS] : 1
Visa Platinum Cashback xxx21000 [MS]: 1

not

Visa Platinum Cashback xxx11040 [MS-TS] : 1
Visa Platinum Cashback xxx21000 [MS]: 2
Again filtering out the duplicate.

When you go to https://sheets.tillerhq.com/ and select your spreadsheet, it shows all of the accounts linked to that sheet. Do these show as two separate accounts there?

Think I might be confusing people.
This is more of a general spreadsheet question.
Just need to run some analysis and wonder how to filter out the duplicates

I think @aronos is trying to help you determine whether you need both accounts linked to the sheet in order to see the data. Do they flow from the main account holder account and still give you the detail you want? Is there a way to prevent the duplicate from flowing in?

Otherwise, you might experiment with `=COUNTIFS` for some DIY analysis

OR the Account filter sheet is handy…

From the look of your example, it seems like you might be loading two accounts with the same data and the easiest solution is to just unlink the duplicate account. I had a similar situation with my 401(k).

I probably didn’t do a good job with explaining my scenario.
I have a sheet where I pull all the accounts including additional card holders (they have their own accounts with logins).

Here’s the sample sheet