Count Rows

admiral100

Well-known Member
Joined
Jan 17, 2015
Messages
873
Hi,

I am looking for a formula or VBA that count only the rows containing the word Yes.
In this example the result should be 3 (row 1,3,4)

A B C
Yes No1 No
No No 2 No
Yes Yes3 Yes
No No4 Yes

<colgroup><col width="70" span="3" style="width:52pt"> </colgroup><tbody>
</tbody>

Thanks
 
maybe something like...

=SUM(IF(FREQUENCY(IF(A1:C4="yes",ROW(A1:A4)-ROW(A1)+1),ROW(A1:A4)-ROW(A1)+1),1)) control shift enter

Hi Weazel ,

Your formula works like a charm! thanks a lot.
I tried hours to resolve only by formula.... you did it.
 
Upvote 0

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Forum statistics

Threads
1,216,555
Messages
6,131,374
Members
449,647
Latest member
pbapro2b

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