0

In Excel how to copy column headers for all the rows which have a Yes against them and show them as comma separated values at the end of the row. For eg: as in the answer column below:

<table width="652">
<tbody>
<tr>
<td width="64">&nbsp;</td>
<td width="64">petrol</td>
<td width="64">diesel</td>
<td width="64">oil</td>
<td width="64">screw</td>
<td width="64">nut</td>
<td width="64">bolt</td>
<td width="64">engine</td>
<td width="140">Answer</td>
</tr>
<tr>
<td>car</td>
<td>Yes</td>
<td>&nbsp;</td>
<td>Yes</td>
<td>Yes</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>Yes</td>
<td>Petrol,oil,screw,engine</td>
</tr>
<tr>
<td>bus</td>
<td>Yes</td>
<td>&nbsp;</td>
<td>Yes</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>Yes</td>
<td>Petrol,oil,engine</td>
</tr>
<tr>
<td>bike</td>
<td>&nbsp;</td>
<td>Yes</td>
<td>Yes</td>
<td>&nbsp;</td>
<td>Yes</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>Diesel,oil,nut</td>
</tr>
<tr>
<td>scooter</td>
<td>&nbsp;</td>
<td>Yes</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>Diesel</td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
Milo
  • 3,365
  • 9
  • 30
  • 44
Nikhilesh
  • 1
  • 1
  • 1
    search the [TEXTJOIN](https://stackoverflow.com/questions/tagged/textjoin) tag. – Scott Craner Jun 18 '18 at 18:19
  • 1
    ^^ this and specifically [this](https://stackoverflow.com/questions/50716550/textjoin-for-xl2013-with-criteria/50719050?s=1|86.5875#50719050) –  Jun 18 '18 at 18:22

0 Answers0