Text join and unique

mduntley

Board Regular
Joined
May 23, 2015
Messages
134
Office Version
  1. 365
Platform
  1. Windows
Hello, I am trying to use the unique value and the text join function. But I am having some trouble.

Data Warehouse.xlsx
ABCD
1510000122763Cost CenterValue 1
2510000122763Cost CenterValue 1
3510000122763Cost CenterValue 1
4510000122763Cost Center & Payor1Value 2
5510000122763Cost Center & Payor2Value 2
6510000122763Cost CenterValue 2
7510000122763Cost CenterValue 2
8
9What I am getting for my Result
10510000122763Cost Center Cost Center & Payor1 Cost Center & Payor2value 1 Value 2
11=TEXTJOIN(CHAR(10),1,UNIQUE(IF(A9&B9=A1:A7,B1:B7,"")))=TEXTJOIN(CHAR(10),1,UNIQUE(IF(A9&B9=A1:A7,C1:C7,"")))
12
13What I'm trying to get
14510000122763Cost Center Cost Center Cost Center & Payor1 Cost Center & Payor2Value 1 Value 2 Value 2 Value 2
Sheet4


Thank you
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

How about
+Fluff 1.xlsm
ABCD
1510000122763Cost CenterValue 1
2510000122763Cost CenterValue 1
3510000122763Cost CenterValue 1
4510000122763Cost Center & Payor1Value 2
5510000122763Cost Center & Payor2Value 2
6510000122763Cost CenterValue 2
7510000122763Cost CenterValue 2
8
9510000122763Cost Center Cost Center & Payor1 Cost Center & Payor2 Cost CenterValue 1 Value 2 Value 2 Value 2
Master
Cell Formulas
RangeFormula
C9C9=TEXTJOIN(CHAR(10),,INDEX(UNIQUE(IF(A9&B9=A1:A7,B1:C7,"")),,1))
D9D9=TEXTJOIN(CHAR(10),,INDEX(UNIQUE(IF(A9&B9=A1:A7,B1:C7,"")),,2))
 
Upvote 0
Try:

=UNIQUE(FILTER(B1:C7,A1:A7=A10&B10))

Edit: Missed the TEXTJOIN requirement.
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0
Glad we could help & thanks for the feedback.

I have another question. I am trying to find a easy way to solve this. I am trying to pull in criteria if one option does not work. So in the example below I want Value 4 in the very last row

Data Warehouse.xlsx
ABCD
1510000122763Cost Centervalue 1
2510000122763Cost Centervalue 1
3510000122763Cost Center & Payor1Value 2
4510000122859AppleValue 3
5510000122AppleValue 4
6510000122763Cost Center & Payor2Value 2
7510000122763Cost CenterValue 2
8510000122763Cost CenterValue 2
9
10510000122763Cost Center Cost Center & Payor1 Cost Center & Payor2 Cost Centervalue 1 Value 2 Value 2 Value 2
11510000122859AppleValue 3
12510000122432  
Sheet4
Cell Formulas
RangeFormula
C10:C12C10=_xlfn.TEXTJOIN(CHAR(10),,INDEX(_xlfn.UNIQUE(IF(A10&B10=A1:A8,B1:C8,"")),,1))
D10:D12D10=_xlfn.TEXTJOIN(CHAR(10),,INDEX(_xlfn.UNIQUE(IF(A10&B10=A1:A8,B1:C8,"")),,2))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
How about
+Fluff 1.xlsm
ABCD
1510000122763Cost Centervalue 1
2510000122763Cost Centervalue 1
3510000122763Cost Center & Payor1Value 2
4510000122859AppleValue 3
5510000122AppleValue 4
6510000122763Cost Center & Payor2Value 2
7510000122763Cost CenterValue 2
8510000122763Cost CenterValue 2
9
10510000122763Cost Center Cost Center & Payor1 Cost Center & Payor2 Cost Centervalue 1 Value 2 Value 2 Value 2
11510000122859AppleValue 3
12510000122432AppleValue 4
Master
Cell Formulas
RangeFormula
C10:C12C10=TEXTJOIN(CHAR(10),,INDEX(UNIQUE(FILTER($B$1:$C$8,A10&B10=$A$1:$A$8,FILTER($B$1:$C$8,A10=$A$1:$A$8))),,1))
D10:D12D10=TEXTJOIN(CHAR(10),,INDEX(UNIQUE(FILTER($B$1:$C$8,A10&B10=$A$1:$A$8,FILTER($B$1:$C$8,A10=$A$1:$A$8))),,2))
 
Upvote 0
How about
+Fluff 1.xlsm
ABCD
1510000122763Cost Centervalue 1
2510000122763Cost Centervalue 1
3510000122763Cost Center & Payor1Value 2
4510000122859AppleValue 3
5510000122AppleValue 4
6510000122763Cost Center & Payor2Value 2
7510000122763Cost CenterValue 2
8510000122763Cost CenterValue 2
9
10510000122763Cost Center Cost Center & Payor1 Cost Center & Payor2 Cost Centervalue 1 Value 2 Value 2 Value 2
11510000122859AppleValue 3
12510000122432AppleValue 4
Master
Cell Formulas
RangeFormula
C10:C12C10=TEXTJOIN(CHAR(10),,INDEX(UNIQUE(FILTER($B$1:$C$8,A10&B10=$A$1:$A$8,FILTER($B$1:$C$8,A10=$A$1:$A$8))),,1))
D10:D12D10=TEXTJOIN(CHAR(10),,INDEX(UNIQUE(FILTER($B$1:$C$8,A10&B10=$A$1:$A$8,FILTER($B$1:$C$8,A10=$A$1:$A$8))),,2))
in cell C12 and D12, i am getting #CALC!
 
Upvote 0
My orginization does not allow us to use Office 365 onto our desktop, but we can do it on the web.
 
Upvote 0
In that case try adding the bit in red
Rich (BB code):
=TEXTJOIN(CHAR(10),,INDEX(UNIQUE(FILTER($B$1:$C$8,A10&B10=$A$1:$A$8,FILTER($B$1:$C$8,A10&""=$A$1:$A$8))),,1))
 
Upvote 0
Solution

Forum statistics

Threads
1,215,924
Messages
6,127,725
Members
449,401
Latest member
TTXS

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