Require formula

Ron99

Active Member
Joined
Feb 10, 2010
Messages
340
Office Version
  1. 2016
Platform
  1. Windows
ID

CODE
OUTPUT
001
AM
AM,AS,PA
001
AS
001
PA
002
ZE
ZE
003
RO
RO,IH
003
IH

<tbody>
</tbody>

I require formula for the above data, I have typed the output that I require, I require formula the output column

Thanks,
Ron
 
Last edited:

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Assuming that TEXTJOIN is available on your Excel system...

In C2 control+shift+enter, not just enter, and copy down:

=IF(ISNA(MATCH(A2,$A$1:A1,0)),TEXTJOIN(",",TRUE,IF($A$2:$A$7=A2,$B$2:$B$7,"")),"")
 
Upvote 0
Hi,

I am using excel 2016, TEXTJOIN function does not show up.
 
Upvote 0
Hi,

I am using excel 2016, TEXTJOIN function does not show up.

In that case:

If the native function TEXTJOIN is not available on your system...

In C2 control+shift+enter, not just enter, and copy down:

=IF(ISNA(MATCH(A2,$A$1:A1,0)),REPLACE(aconcat(IF($A$2:$A$7=$A2,", "&$B$2:$B$7,"")),1,1,""),"")

For this formula to work, add the following code for ACONCAT as a Module to your workbook using Alt+F11...

Function aconcat(a As Variant, Optional sep As String = "") As String
' Harlan Grove, Mar 2002
Dim y As Variant
If TypeOf a Is Range Then
For Each y In a.Cells
aconcat = aconcat & y.Value & sep
Next y
ElseIf IsArray(a) Then
For Each y In a
aconcat = aconcat & y & sep
Next y
Else
aconcat = aconcat & a & sep
End If
aconcat = Left(aconcat, Len(aconcat) - Len(sep))
End Function
 
Last edited:
Upvote 0
Thank you very much for your time. That helps.
 
Upvote 0

Forum statistics

Threads
1,215,079
Messages
6,123,009
Members
449,093
Latest member
ikke

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