How to evaluate colums for a certain value and if criteria is met count it as one record?

Internhelp

New Member
Joined
Jul 5, 2016
Messages
8
Hello,

I have rows of data in Excel. I need a formula or function or whatever that will do the following:

Go row by row if at least any of the columns in 3 through 5 has a value as "Yes", Then count it as one record. Grouped by Age (20-30), (30-40),(40-50). So, this formula should answer how many 20-30-year-olds have at least one "Yes" as a value in Columns 3 through 5?


Please see my attachment with dummy data.

Thanks in advance!
 

Attachments

  • DummyData.png
    DummyData.png
    201.1 KB · Views: 11

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
In column 6 put this formula then drag down as far as required
Excel Formula:
=IF(COUNTIF(C2:E2,"yes")>0,1)
Then put a sum at the bottm if you need a Total
 
Upvote 0
Or you could try this solution.

I have your data in the spreadsheet like this.

Enter the following formula in F2 and copy it down

=IF(COUNTIFS(C2:E2,"Yes")>=1,"Yes","No")

1624234064277.png


Create a bin from I3 to I7 and enter the following formula in J3.

=FREQUENCY(IF($F$2:$F$11="Yes",$B$2:$B$11,""),$I$3:$I$6)

I assume that you are using Office 365.

Kind regards

Saba
 
Upvote 0
also yu can use Pivot Table.
group by in pivot table.
and either put yes/ no into columns or do some DAX formula
 
Upvote 0

Forum statistics

Threads
1,214,965
Messages
6,122,499
Members
449,089
Latest member
Raviguru

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