Text join and unique

mduntley

Board Regular
Joined
May 23, 2015
Messages
139
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
 
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))
Fluff, do you think you can turn this into a formula that can work in Excel 2016? I have this fomula as a custom formula but i want to have it show it only once instead of repeating

VBA Code:
Function myvlookup(pValue As String, pWorkRng As Range, pIndex As Long)
For Each rng In pWorkRng
    If rng = pValue Then
        xResult = xResult & vbNewLine & rng.Offset(0, pIndex - 1)
    End If
Next
myvlookup = Mid(xResult, 3)
End Function
 
Upvote 0

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Fraid not as 2016 doesn't have the textjoin function.
 
Upvote 0
i want to have it show it only once instead of repeating
Originally you wanted the values repeated. But as this is now a different question, you will need to start a new thread. Thanks
 
Upvote 0

Forum statistics

Threads
1,223,912
Messages
6,175,348
Members
452,638
Latest member
Oluwabukunmi

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