# extract unique entries based on two criterias

#### snjpverma

##### Well-known Member
I want the output as shown in Cell A13. All the unique names should be extracted (unique should be determined as per the Name and Employee ID because there are people with same name but different employee ID.

Asset tool.xlsx
ABCDE
1Sales peronEmp IDProfits earnedDatesStore
2Jack15₹ 20,957.0003-04-2017East
3Bob12₹ 56,323.0005-02-2018West
4Bob12₹ 31,892.0009-07-2018West
5Jack15₹ 55,224.0015-10-2018East
6Luke30₹ 27,937.0029-08-2019West
7James25₹ 35,356.0025-01-2022East
8Bob12₹ 29,117.0030-05-2022West
9Ali88₹ 41,665.0023-10-2022East
10Jack15₹ 29,451.0002-11-2022East
11
12
13The following people have not met the requirement of minimum two submissions: 1) Luke 2) Ali and 3)James.
Sheet2

Thank You

### Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

#### jorismoerings

##### Well-known Member
Hi,

Try this:
Book1
ABCDEFG
1Sales peronEmp IDProfits earnedDatesStore
2Jack152095742828EastAli
3Bob125632343136WestJames
4Bob123189243290WestLuke
5Jack155522443388East
6Luke302793743706West
7James253535644586East
8Bob122911744711West
9Ali884166544857East
10Jack152945144867East
Sheet2
Cell Formulas
RangeFormula
G2:G9G2=IFERROR(LOOKUP(2,1/((COUNTIF(\$G\$1:G1,\$A\$2:\$A\$10)=0)*(COUNTIF(\$A\$2:\$A\$10,\$A\$2:\$A\$10)=1)),\$A\$2:\$A\$10),"")
Press CTRL+SHIFT+ENTER to enter array formulas.

#### snjpverma

##### Well-known Member
is it possible to get the result in one cell like in A13 from Post #1?

#### jorismoerings

##### Well-known Member
Hi,

With your current Excel version being 2016 - No, not without having to go to a VBA solution.
More info - take a look at previous provided solutions here Substitution for TEXTJOIN

#### snjpverma

##### Well-known Member

I am open to using VBA solution and it's been a long time since I wrote a VBA code.

#### jorismoerings

##### Well-known Member
I am open to using VBA solution and it's been a long time since I wrote a VBA code.
did you look at the link? Shown is a complete VBA part which handles your question to concatenate everything into one cell.

#### snjpverma

##### Well-known Member

thanks jorismoerings, I will surely make use of this ACONCAT. seems to be a very useful code. will post here in case of any help required with the Substitute function with the Aconcat.

#### Eric W

##### MrExcel MVP
You can do it with some helper cells:

Book2
ABCDEFGH
1Sales peronEmp IDProfits earnedDatesStore
2Jack152095742828EastAli1) Ali
3Bob125632343136WestJames1) Ali 2) James
4Bob123189243290WestLuke1) Ali 2) James 3) Luke
5Jack155522443388East 1) Ali 2) James 3) Luke
6Luke302793743706West 1) Ali 2) James 3) Luke
7James253535644586East 1) Ali 2) James 3) Luke
8Bob122911744711West 1) Ali 2) James 3) Luke
9Ali884166544857East 1) Ali 2) James 3) Luke
10Jack152945144867East1) Ali 2) James 3) Luke
11
12
13The following people have not met the requirement of minimum two submissions: 1) Ali 2) James 3) Luke
Sheet3
Cell Formulas
RangeFormula
G2:G9G2=IFERROR(LOOKUP(2,1/((COUNTIF(\$G\$1:G1,\$A\$2:\$A\$10)=0)*(COUNTIF(\$A\$2:\$A\$10,\$A\$2:\$A\$10)=1)),\$A\$2:\$A\$10),"")
H2:H10H2=IF(G2="",H1&"",H1&ROWS(\$H\$2:\$H2)&") "&G2&" ")
A13A13=IF(H10="","Everyone has met the requirement","The following people have not met the requirement of minimum two submissions: "&H10)

#### snjpverma

##### Well-known Member
I just noticed that the system on which I am trying to work this out does have a TEXTJOIN function. Please let me know how can we simplify this with Textjoin?

#### Eric W

##### MrExcel MVP
Try:

Book1
ABCDE
1Sales peronEmp IDProfits earnedDatesStore
2Jack15209574/3/2017East
3Bob12563232/5/2018West
4Bob12318927/9/2018West
5Jack155522410/15/2018East
6Luke30279378/29/2019West
7James25353561/25/2022East
8Bob12291175/30/2022West
9Ali884166510/23/2022East
10Jack152945111/2/2022East
11
12
13The following people have not met the requirement of minimum two submissions: Luke, James, Ali
Sheet1
Cell Formulas
RangeFormula
A13A13="The following people have not met the requirement of minimum two submissions: "&TEXTJOIN(", ",1,IF(COUNTIF(A2:A10,A2:A10)=1,A2:A10,""))
Press CTRL+SHIFT+ENTER to enter array formulas.

Replies
1
Views
127
Replies
11
Views
258
Replies
2
Views
484
Replies
2
Views
74
Replies
11
Views
226

1,148,189
Messages
5,745,241
Members
423,936
Latest member
Conservatopia

### 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.

### Which adblocker are you using?

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

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