# If Statment To Find Percent Based On Yes Or No

#### rockyw

##### Well-known Member
I have a list of 13 columns that could be yes or no. I need the percent that is marked as yes. Can I use an IF formula?? The formula will be in D6 looking at F14:F26, Thanks

### Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
=COUNTIF(\$F\$14:\$F\$26,"yes")/ROWS(F14:F26)

Thanks that worked. Now can I use this formula to find the values in column E that go with the names in column B, is this close? Thanks
=SUM((\$E\$14:\$E\$26)*(\$B\$14:\$B\$26=A6))

I have this formula that I need to change to row 26, when I do that I get an error. Why would this happen? Thnaks
=SUM((\$F\$14:\$F\$25="yes")*(\$B\$14:\$B\$25=A6))

Thanks that worked. Now can I use this formula to find the values in column E that go with the names in column B, is this close? Thanks

Like this?
Excel 2010
ABE
126
13
14yes1
15yes1
16yes1
17no1
18no1
19no1
20no1
21no1
22no1
23no1
24yes1
25yes1
26yes1

</tbody>
Sheet1

Worksheet Formulas
CellFormula
A12=SUMIF(\$B\$14:\$B\$26,A6,\$E\$14:\$E\$26)

</tbody>

<tbody>
</tbody>

Not sure about the second request.
Do you want to count all occurance of A6 in column B that match "yes" in column F?

Last edited:
That works great,now can I add one more thing. Can I base that off in column F is a Yes or No. I have this so far.
Code:
``=SUM((\$F\$14:\$F\$26="yes")*(\$B\$14:\$B\$26=A6,E14:E26))``

Is this close? Thanks

=SUM((\$F\$14:\$F\$25="yes")*(\$B\$14:\$B\$25=A6))

Yes all I want to do is add one more row, to 26 but the formula stops working when I do that. I don't understand that?

Bump, can anyone help with this please? Column F has Yes or No, column B has names, A6 has one of the names in B. If column F has a yes for the name in A6 the formula adds the sum in column E for that name. So if there are 3 of the same name it adds all the sums behind he name in column E. I had this but will not work. Thanks
=SUM((\$F\$14:\$F\$26="yes")*(\$B\$14:\$B\$26=A6,E14:E26))</PRE>

Excel 2010
ABCDEF
5Excel 03/07/10Excel 07/10Excel 03/07/10
6robert111
7
14Joe1yes
15Robert1yes
16Jerry1yes
17Robert1no
18Joe1no
19mama1no
20kasia1no
21Joe1no
22Gui1no
23papa1no
24mumu1yes
25ffuf1yes
26mama1yes
Sheet1
Cell Formulas
RangeFormula
C6=SUMIFS(E14:E26,\$F\$14:\$F\$26,"yes",\$B\$14:\$B\$26,A6)
D6=SUMPRODUCT(--(\$F\$14:\$F\$26="yes"),--(\$B\$14:\$B\$26=A6),E14:E26)
B6{=SUM(IF(\$F\$14:\$F\$26="yes",IF(\$B\$14:\$B\$26=A6,E14:E26)))}
Press CTRL+SHIFT+ENTER to enter array formulas.

Thank you for the help. I never worked with an Aray before. Thanks

Replies
13
Views
995
Replies
2
Views
285
Replies
9
Views
251
Replies
3
Views
75
Replies
3
Views
184

1,203,109
Messages
6,053,563
Members
444,673
Latest member

### 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.

### Which adblocker are you using?

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

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