Excel formula to count if cell value matches with specified range

Lekha mohanty

New Member
Joined
Oct 26, 2021
Messages
12
Office Version
  1. 2010
Platform
  1. Windows
  2. Web
In A column I have data from 1 to 100, in B column I have "Yes" or "No".

In C1 I want a formula total of "yes" from Serial (1 to 30) + (41 to 60) + (91 to 100), Similarly in D1 total of "yes" from Serial (31 to 40) + (61 to 90)

what should be the formula ??


exp garuda.xlsx
ABCD
11Yes3117
22Yes
33Yes
44No
55No
66Yes
77No
88Yes
99Yes
1010No
1111No
1212No
1313No
1414Yes
1515Yes
1616Yes
1717No
1818No
1919Yes
2020No
2121Yes
2222Yes
2323No
2424No
2525No
2626No
2727Yes
2828Yes
2929Yes
3030No
3131No
3232Yes
3333No
3434Yes
3535Yes
3636No
3737No
3838No
3939No
4040Yes
4141Yes
4242Yes
4343No
4444No
4545Yes
4646No
4747Yes
4848Yes
4949No
5050No
5151No
5252No
5353Yes
5454Yes
5555Yes
5656No
5757No
5858Yes
5959No
6060Yes
6161Yes
6262No
6363No
6464No
6565No
6666Yes
6767Yes
6868Yes
6969No
7070No
7171Yes
7272No
7373Yes
7474Yes
7575No
7676No
7777No
7878No
7979Yes
8080Yes
8181Yes
8282No
8383No
8484Yes
8585No
8686Yes
8787Yes
8888No
8989No
9090No
9191No
9292Yes
9393Yes
9494Yes
9595No
9696No
9797Yes
9898No
9999Yes
100100Yes
Sheet1
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
in C1
Excel Formula:
=COUNTIF(B1:B30,"Yes")+COUNTIF(B41:B60,"Yes")+COUNTIF(B91:B100,"Yes")

in D1
Excel Formula:
=COUNTIF(B31:B40,"Yes")+COUNTIF(B61:B90,"Yes")
 
Upvote 0
Solution

Forum statistics

Threads
1,224,823
Messages
6,181,182
Members
453,021
Latest member
Mohamed Magdi Tawfiq Emam

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