Finding Duplicate values in column A using 2 criteria's from column B

Tgandhi

New Member
Joined
Jul 27, 2020
Messages
8
Office Version
  1. 2016
Platform
  1. Windows
Hello all,

I have tried several formulas and ways but none works for me. Basically I need to find the list of accounts ( I am dealing with 10000 rows on daily basis) that are duplicate or repeated several times in the spreadsheet matching 2 criteria's from column B. So what I need help is to get a formula that basically highlights or produce unique value like "yes" or "1" so that I can apply maybe color filter and work on the rest of data on the sheet.

For e.g. on the attached excel sheet accounts 1324A, 1653C, 9825A are repeated multiple times, now using the criteria cash and security from column B I need to get a list that shows only accounts that are repeated ( but I need the list in this case 1234A is repeated 3 times so I need something that produces those account list with 1234A showing thrice) so that I can exclude them.

If you look at the snip, accounts: 1678B, 7894A and 5654B are the only accounts I need to work on for the daily basis and the rest accounts repeated multiple times needs to be excluded.

I have included the snip of the way the result should appear. Any help will be greatly appreciated!
 

Attachments

  • Excel example snip.PNG
    Excel example snip.PNG
    11.6 KB · Views: 7

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Sorry guys, updated the snip with correct info.

Basically, the formula should capture duplicate accounts only if that account has both cash and security. In case if in column A accounts are repeated several times but in column B all the repeated entries has just cash in that case there should not be any unique value in column C as I can actually include that data. Basically we need isolate accounts that has both cash and security and if that accounts also is repeated multiple times than it produces unique value so only that data can be excluded and we can work on rest of the data.

Currently, I am using this formula =COUNTIFS($A$2:A2,A2,$B$2:B2,"Cash")*COUNTIFS($A$2:A2,A2,$B$2:B2,"Security")>0)*1. The issue with this formula is I have to manually figure out the duplicate rows for each account that are repeated and matches the criteria from column B Cash & security. So what I do know once I have unique value 1 I have to highlight the corresponding accounts that are repeated and then apply color filter and work on the rest of that data and with 10000 rows its taking too much time.

So in the above snip, 1678B, 7894A and 5654B are the only accounts I can work on. 1678B is repeated only 1 time so no issue, 7894A and 5654B are repeated 2 times but it does not have cash and security both so its ok.

Thanks again for your help!

Also asked here Finding Duplicate accounts in column A matching criteria column B
 
Last edited by a moderator:
Upvote 0
How about
Excel Problem part 2.xlsx
ABCD
1AccountMatchUnique Value
21234ACashYes or 1Y
31234ASecurityYes or 1Y
41678BCash 
51653CCashYes or 1Y
61653CSecurityYes or 1Y
77894Acash 
87894ACash 
95645BsecurityY
105645BSecurityY
119825ACashYes or 1 
129825ACashYes or 1 
131234ASecurityYes or 1Y
141234ASecurityYes or 1Y
Sheet1
Cell Formulas
RangeFormula
D2:D14D2=IF(COUNTIFS(A:A,A2,B:B,"<>cash")>0,"Y","")
Named Ranges
NameRefers ToCells
_FilterDatabase=Sheet1!$A$1:$C$14D2:D14
 
Upvote 0
Hello,
Thank you so much for all you help! It really means a lot.
The formula is great, I was wondering how to edit this formula further so that even row 9 & 10 (Account: 5645B - has multiple entries but with security only no cash meaning I don't need to have Y in D column just like row 7 & 8 for account# 7894A with cash only in both rows and also like row 11 & 12 for account# 9825A?
Basically in the above screenshot i need to have unique value in row 2,3,5,6,13 and 14 only as only those accounts are repeated multiple times or duplicate and has both cash and security in column B.

Thanks again!
 
Upvote 0
Ok, how about
Excel Formula:
=IF(COUNTIFS(A:A,A2,B:B,"<>"&B2)>0,"Y","")
 
Upvote 0

Forum statistics

Threads
1,214,978
Messages
6,122,547
Members
449,089
Latest member
davidcom

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