Help with IF function scanning a range of cells

frannyM

New Member
Joined
Jan 8, 2021
Messages
3
Office Version
  1. 2019
Platform
  1. Windows
Hello,

I need help with an IF function. I may be using the wrong function, but basically, I want the logical test to scan a range of cells to see if they have "Yes". If the cell has yes, I want to add the column title into the description.

Example: Accessory 1 is compatible with System 1 and System 3. In the description cell, I want to use the formula to scan the row for "Yes" and return System 1, System 3.

When I use this formula =IF(D3:N3="Yes",D2:N2,"") I get a #VALUE! error.

When I use the formula to reference two specific cells, =IF(D7= "Yes",D2,"") it works but then I would have to use multiple formulas in one cell?

I attached a screenshot showing what I am working with, I can clarify further I didn't explain this thoroughly enough.

Thank you!

ExcelPhoto1.png
 

Some videos you may like

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
12,399
Office Version
  1. 365
Platform
  1. Windows
Try
Excel Formula:
=TEXTJOIN(", ",1,IF(D2:N2="Yes",D$1:N$1,""))
Which must be array confirmed with Ctrl Shift Enter.
 

frannyM

New Member
Joined
Jan 8, 2021
Messages
3
Office Version
  1. 2019
Platform
  1. Windows
Try
Excel Formula:
=TEXTJOIN(", ",1,IF(D2:N2="Yes",D$1:N$1,""))
Which must be array confirmed with Ctrl Shift Enter.

Thanks for the quick response! I tried using that formula it seems to only output 0s. I attached a couple of photos that might be helpful.
 

Attachments

  • ExcelPhoto2.png
    ExcelPhoto2.png
    31.5 KB · Views: 3
  • ExcelPhoto2.png
    ExcelPhoto2.png
    31.5 KB · Views: 4
  • ExcelPhoto3.png
    ExcelPhoto3.png
    41 KB · Views: 3
  • ExcelPhoto4.png
    ExcelPhoto4.png
    52.4 KB · Views: 4

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
12,399
Office Version
  1. 365
Platform
  1. Windows
Sorry, my fault. I missed the empty row at the top of the sheet. It should be
Excel Formula:
=TEXTJOIN(", ",1,IF(D3:N3="Yes",D$2:N$2,""))
 
Solution

frannyM

New Member
Joined
Jan 8, 2021
Messages
3
Office Version
  1. 2019
Platform
  1. Windows
Awesome that worked! Thank you for your help much appreciated!
 

Watch MrExcel Video

Forum statistics

Threads
1,126,931
Messages
5,621,663
Members
415,849
Latest member
PhoenixRising2015

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
Top