List cells with "YES" Value

surkdidat

Well-known Member
Joined
Oct 1, 2011
Messages
579
Office Version
  1. 2016
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

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
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
1AAABBBCCCDDDANSWER
2YESYESNONOAAA BBB
3NONONONO
4NOYESNONOBBB
5NOYESNOYESBBB DDD

<colgroup><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Array Formulas
CellFormula
P2{=TRIM(CONCAT(IF($L2:$O2="YES",$L$1:$O$1&" ","")))}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>



Previous versions:

LMNOP
1AAABBBCCCDDDANSWER
2YESYESNONOAAA BBB
3NONONONO
4NOYESNONOBBB
5NOYESNOYESBBB DDD

<colgroup><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
P2=TRIM(IF($L2="YES",$L$1&" ","")&IF($M2="YES",$M$1&" ","")&IF($N2="YES",$N$1&" ","")&IF($O2="YES",$O$1&" ",""))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>



WBD
 
Upvote 0

Forum statistics

Threads
1,213,563
Messages
6,114,329
Members
448,564
Latest member
ED38

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