Duplicate Values in Column A using criteria from Column B

Tgandhi

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

I have question related to excel that I have been trying to figure it out. Basically I am looking to produce duplicate from Column A(Account) only if both the criteria met from column B(Match). So the account number in column A should be repeated for both cash and security under column B and produce list of account who has both cash and security match type. Any help would be greatly appreciated.

Thank you.
 

Attachments

  • Excel.PNG
    Excel.PNG
    6 KB · Views: 15

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Hi and welcome to MrExcel
You can put the following formula in column C:

varios 27jul2020.xlsm
ABC
1AccountMathcCount
21234ACash1
31234ASecurity2
41678BCash1
51653CCash1
61653CSecurity2
77894ACash1
85645BSecurity1
99825ACash1
Hoja2
Cell Formulas
RangeFormula
C2:C9C2=COUNTIFS($A$2:A2,A2,$B$2:B2,"Cash")+COUNTIFS($A$2:A2,A2,$B$2:B2,"Security")


Then filter column C by the value 2. In column A you will have the data:
varios 27jul2020.xlsm
ABC
1AccountMathcCount
31234ASecurity2
61653CSecurity2
Hoja2
 
Upvote 0
Hi Thank you so much for your response, I was wondering if there is any way that we can make sure that only duplicates are reflected only when that account has both security and cash 'Match type column B', because I just realized the sheet I am working on also has duplicate accounts with 2 times cash as well which is creating issue with the formula that you shared. So in the above excel if Account '1653C' repeated twice or thrice with Match under column B as "Cash' than it creates the issue with the formula, is there any easy way around it to fix it.
 
Upvote 0
varios 27jul2020.xlsm
ABC
1AccountMathcCount
21234ACash1
31234ASecurity2
41678BCash1
51653CCash1
61653CSecurity2
71653CSecurity3
81653CCash4
97894ACash1
105645BSecurity1
119825ACash1
Hoja2
Cell Formulas
RangeFormula
C2:C11C2=COUNTIFS($A$2:A2,A2,$B$2:B2,"Cash")+COUNTIFS($A$2:A2,A2,$B$2:B2,"Security")


In the example above I have the same account 4 times.
But you should filter only those with number 2:
varios 27jul2020.xlsm
ABC
1AccountMathcCount
31234ASecurity2
61653CSecurity2
Hoja2
 
Upvote 0
Hi thanks for the clarification, sorry I just want to find out what if account 1653c is repeated 4 times but with Match as only cash and not security, I tried the formula above in that case it dies jot produce the result.
 
Upvote 0
I tried the formula above in that case it dies
I'm sorry about that.
Try the following, here with more cases:
varios 27jul2020.xlsm
ABC
1AccountMatchCount
21234ACash0
31234ASecurity1
41678BCash0
51653CSecurity0
61653CSecurity0
71653CSecurity0
81653CSecurity0
97894ACash0
105645BSecurity0
119825ACash0
129825ASecurity1
13111aCash0
14111aCash0
15111aCash0
16222aCash0
17222aCash0
18222aSecurity1
19333cSecurity0
20333cSecurity0
21333cCash1
Hoja2
Cell Formulas
RangeFormula
C2:C21C2=(COUNTIFS($A$2:A2,A2,$B$2:B2,"Cash")*COUNTIFS($A$2:A2,A2,$B$2:B2,"Security")>0)*1


Filter by 1
varios 27jul2020.xlsm
ABC
1AccountMatchCount
31234ASecurity1
129825ASecurity1
18222aSecurity1
21333cCash1
Hoja2
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,716
Members
448,985
Latest member
chocbudda

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