List cells with "YES" Value

surkdidat

Well-known Member
Joined
Oct 1, 2011
Messages
594
Office Version
  1. 365
Hi all

In Row 1 I have the heading names i.e AAA BBB CCC DDD etc
What I would like in column P, it looks at that the cell value, and if there is a yes. it lists it in column P
So :-

PHP:
 -----L---- | -----M---- | -----N---- | -----O---- | -----P---- | 
----AAA--- | ---BBB--- | ---CCC--- | ---DDD--- | ANSWER-| 

--- YES----|-----YES---|-----NO----|------NO---| AAA BBB  |
-----NO----|-----NO----|-----NO----|-----NO----| (no value) |
-----NO----|-----YES---|-----NO----|-----NO----| ----BBB--- |
-----NO----|-----YES---|-----NO----|----YES----| BBB DDD   |
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Not sure this is do-able with standard Excel, do you mean with a macro?

If so, what is the name of the sheet the data is on and what column defines the last row of data?
 
Upvote 0
Excel 2016 solution:


Book1
LMNOP
1AAABBBCCCDDDANSWER
2YESYESNONOAAA BBB
3NONONONO
4NOYESNONOBBB
5NOYESNOYESBBB DDD
Sheet1
Cell Formulas
RangeFormula
P2{=TRIM(CONCAT(IF($L2:$O2="YES",$L$1:$O$1&" ","")))}
Press CTRL+SHIFT+ENTER to enter array formulas.


Previous versions:


Book1
LMNOP
1AAABBBCCCDDDANSWER
2YESYESNONOAAA BBB
3NONONONO
4NOYESNONOBBB
5NOYESNOYESBBB DDD
Sheet1
Cell Formulas
RangeFormula
P2=TRIM(IF($L2="YES",$L$1&" ","")&IF($M2="YES",$M$1&" ","")&IF($N2="YES",$N$1&" ","")&IF($O2="YES",$O$1&" ",""))


WBD
 
Upvote 0
Excellent. That's going into my collection, very useful!! :) :) :)

Excel 2016 solution:

LMNOP
AAABBBCCCDDDANSWER
YESYESNONOAAA BBB
NONONONO
NOYESNONOBBB
NOYESNOYESBBB DDD

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

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

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

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

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

</tbody>
Sheet1

[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: 10"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]P2[/TH]
[TD="align: left"]{=TRIM(CONCAT(IF($L2:$O2="YES",$L$1:$O$1&" ","")))}[/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]



Previous versions:

LMNOP
AAABBBCCCDDDANSWER
YESYESNONOAAA BBB
NONONONO
NOYESNONOBBB
NOYESNOYESBBB DDD

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

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

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

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

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

</tbody>
Sheet1

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet 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: 10"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]P2[/TH]
[TD="align: left"]=TRIM(IF($L2="YES",$L$1&" ","")&IF($M2="YES",$M$1&" ","")&IF($N2="YES",$N$1&" ","")&IF($O2="YES",$O$1&" ",""))[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]



WBD
 
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,269
Members
452,628
Latest member
dd2

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