Help creating a formula for this...

Rachyst01

New Member
Joined
Jul 19, 2022
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Hello, I have a table that looks like this
1658262208692.png

I have to create a separate table to separate the names in the following way: 1 column for names with only new, one column for names with only existing and 1 column for names that have new and existing. I am struggling to find formulas for that and I am not sure how to arrange my data to make it easier. Note that many names have duplicates, which makes it harder.
Please, any idea would help
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Sorry, the formula for duplicates was wrong, refer to this screenshot instead
1658262511372.png
 
Upvote 0
Might be a better way, but this seems to work.

BookII.xlsm
ABCDEFGH
1NameNew or ExistingDuplicatesBothExisting OnlyNew Only
2DavidExistingYesDavidPeterAxul
3DavidNewnoAmericaElfieDorka
4AxulNewYesRachel
5PeterExistingYesDamon
6PeterExistingYes
7ElfieExistingno
8RachelExistingYes
9RachelExistingYes
10DorkaNewno
11DamonExistingno
12AmericaNewYes
13AmericaExistingYes
Sheet6
Cell Formulas
RangeFormula
F2:F3F2=LET(r,A2:A13,ne,B2:B13,e,UNIQUE(FILTER(r,ne="Existing")),n,UNIQUE(FILTER(r,ne="New")),m,MATCH(e,n,0),ie,IFERROR(INDEX(n,m),FALSE),FILTER(ie,ie<>FALSE))
G2:G5G2=LET(r,A2:A13,b,F2#,f,NOT(ISNUMBER(MATCH(r,b,0))),nb,FILTER(r,f),m,ISNUMBER(MATCH(r,nb,0)),UNIQUE(FILTER(r,m*(B2:B13="Existing"))))
H2:H3H2=LET(r,A2:A13,b,F2#,f,NOT(ISNUMBER(MATCH(r,b,0))),nb,FILTER(r,f),m,ISNUMBER(MATCH(r,nb,0)),UNIQUE(FILTER(r,m*(B2:B13="New"))))
Dynamic array formulas.
 
Upvote 0
Another option:

Book1
ADAEAFAGAHAIAJ
1
2
3NameNew or ExistingDuplicates?Only NewOnly ExistingBoth
4DavidExistingYesAxulDamonAmerica
5DavidNewYesDorkaElfieDavid
6AxulNewNoPeter
7PeterExistingYesRachel
8PeterExistingYes
9ElfieExistingNo
10RachelExistingYes
11RachelExistingYes
12DorkaNewNo
13DamonExistingNo
14AmericaNewYes
15AmericaExistingYes
16
Sheet12
Cell Formulas
RangeFormula
AH4:AH5AH4=SORT(UNIQUE(FILTER(AD4:AD25,(COUNTIFS(AD4:AD25,AD4:AD25,AE4:AE25,"Existing")=0)*(AD4:AD25<>""))))
AI4:AI7AI4=SORT(UNIQUE(FILTER(AD4:AD25,(COUNTIFS(AD4:AD25,AD4:AD25,AE4:AE25,"New")=0)*(AD4:AD25<>""))))
AJ4:AJ5AJ4=SORT(UNIQUE(FILTER(AD4:AD25,(AD4:AD25<>"")*ISERROR(MATCH(AD4:AD25,AH4#,0))*ISERROR(MATCH(AD4:AD25,AI4#,0)))))
AF4:AF15AF4=IF(COUNTIF($AD$4:$AD$20,AD4)>1,"Yes","No")
Dynamic array formulas.
 
Upvote 0
Thank you, my final goal is to produce a count of those names but once I use COUNTA() in front of any of those formulas, the number I get is not accurate since when I sum up the total names without duplicates, it doesn't give the same number as when I add up the new, existing and both. Any idea on how to fix this?
 
Upvote 0
I'm a little confused. It sounds like you're trying to reconcile the 2 tables. You could just use a COUNTIF to see how many times each name appears:

Book1
ADAEAFAGAHAIAJAKALAMANAO
19893110
2
3NameNew or ExistingDuplicates?Only NewOnly ExistingBoth
4DavidExistingYesAxul1Damon1America2
5DavidNewYesDorka1Elfie1David2
6AxulNewNoPeter2
7PeterExistingYesRachel2
8PeterExistingYes
9ElfieExistingNo
10RachelExistingYes26412
11RachelExistingYes12
12DorkaNewNo
13DamonExistingNo
14AmericaNewYes
15AmericaExistingYes
16
Sheet12
Cell Formulas
RangeFormula
AH1,AL1,AJ1AH1=LEN(FORMULATEXT(AH4))
AH4:AH5AH4=SORT(UNIQUE(FILTER(AD4:AD25,(COUNTIFS(AD4:AD25,AD4:AD25,AE4:AE25,"Existing")=0)*(AD4:AD25<>""))))
AI4:AI5,AM4:AM5,AK4:AK7AI4=COUNTIF($AD$4:$AD$15,AH4#)
AJ4:AJ7AJ4=SORT(UNIQUE(FILTER(AD4:AD25,(COUNTIFS(AD4:AD25,AD4:AD25,AE4:AE25,"New")=0)*(AD4:AD25<>""))))
AL4:AL5AL4=SORT(UNIQUE(FILTER(AD4:AD25,(AD4:AD25<>"")*ISERROR(MATCH(AD4:AD25,AH4#,0))*ISERROR(MATCH(AD4:AD25,AJ4#,0)))))
AI10,AM10,AK10AI10=SUM(AI4:AI8)
AO10AO10=SUM(AI10:AM10)
AO11AO11=COUNTA(AD4:AD20)
AF4:AF15AF4=IF(COUNTIF($AD$4:$AD$20,AD4)>1,"Yes","No")
Dynamic array formulas.


If this isn't what you want, please manually create a screen shot of what you want the results to look like and show it to us.
 
Upvote 0

Forum statistics

Threads
1,215,046
Messages
6,122,854
Members
449,096
Latest member
Erald

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