Return Multiple Column headings in a single Cell

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

Book1
ABCDEFGHIJK
1Mark 1Mark 2Mark 3Mark 4Mark 5Mark 6Mark 7Mark 8Mark 9Mark 10
212xx45101091Mark 3,Mark 4
35x6864985xMark 2,Mark 10
Sheet1


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

=TEXTJOIN(",",TRUE,IF($A2:$J2="x",$A$1:$J$1,""))
 
Upvote 0
Hi Aladin,

I'm using EXCEL 2013, But when i try this it is not working.
It gives below error "#NAME?"

Plz help me with another formulas.

Thanks


Mark 1Mark 2Mark 3Mark 4Mark 5Mark 6Mark 7Mark 8Mark 9Mark 10Answer
12XX4510109=TEXTJOIN(",",TRUE,IF($A2:$J2="X",$A$1:$J$1,""))
5x6864985X#NAME?

<colgroup><col span="9"><col><col></colgroup><tbody>
</tbody>


ABCDEFGHIJK
1Mark 1Mark 2Mark 3Mark 4Mark 5Mark 6Mark 7Mark 8Mark 9Mark 10
212xx45101091Mark 3,Mark 4
35x6864985xMark 2,Mark 10

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

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

=TEXTJOIN(",",TRUE,IF($A2:$J2="x",$A$1:$J$1,""))
 
Upvote 0
Hi Aladin,

I'm using EXCEL 2013, But when i try this it is not working.
It gives below error "#NAME ?"

Plz help me with another formulas.

Thanks

[…]

Excel 2013 does not have the TEXTJPOIN function, hence the #NAME ? error. Try the following instead...

Add the following VBA code to your workbook as a module, 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

Then invoke...

Control+shift+enter, not just enter:

=REPLACE(ACONCAT(IF($A2:$J2="x",","&$A$1:$J$1,"")),1,1,"")
 
Upvote 0

Forum statistics

Threads
1,213,544
Messages
6,114,239
Members
448,555
Latest member
RobertJones1986

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