Need help with a EXCEL formula or Function to combine the headers names after trim based on specific the cell data

bb19august

New Member
Joined
Feb 1, 2019
Messages
18
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]TESTF1[/TD]
[TD]TESTF2[/TD]
[TD]TESTF3[/TD]
[TD]TESTF4[/TD]
[TD]TESTR1[/TD]
[TD]TESTR2[/TD]
[TD]TESTR3[/TD]
[TD]TESTR4[/TD]
[TD]RESULT[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]YES[/TD]
[TD]NO[/TD]
[TD]YES[/TD]
[TD]NO[/TD]
[TD]YES[/TD]
[TD]NO[/TD]
[TD]YES[/TD]
[TD]YES[/TD]
[TD]F1, F3, R1, R3, R4[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]NO[/TD]
[TD][/TD]
[TD]NO[/TD]
[TD][/TD]
[TD]NO[/TD]
[TD]NO[/TD]
[TD][/TD]
[TD][/TD]
[TD]NO RESULT[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]NO RESULT[/TD]
[/TR]
</tbody>[/TABLE]

Need help with a formula or function to get a result, if the cell has "YES" or any specific text/NUMBER (above eg. "YES"), which concatenates the header names after trimming it to last two characters and separated by comma and a space.
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
ABCDEFGHI
TESTF1TESTF2TESTF3TESTF4TESTR1TESTR2TESTR3TESTR4RESULT
YESNOYESNOYESNOYESYESF1, F3, R1, R3, R4

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: center"]2[/TD]

</tbody>
Sheet2

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Array Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]I2[/TH]
[TD="align: left"]{=TEXTJOIN(", ",TRUE,IF(A2:H2="Yes",RIGHT(A1:H1,2),""))}[/TD]
[/TR]
</tbody>[/TABLE]
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself[/TD]
[/TR]
</tbody>[/TABLE]

This assumes you have Excel 2016, if you do not I'd need a little time to consider an alternative.
 
Upvote 0
I included a UDF for textjoin and was able to get the expected results. Thanks so much for your time and help.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,021
Latest member
Justyna P

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