Count ifs

aysam

Board Regular
Joined
Jun 24, 2009
Messages
225
Office Version
  1. 2010
Platform
  1. Windows
Hi all
I have to columns. One has the names of classes
1/1. 1/2. 1/3 2/5. 2/6. 2/70.........
The other has the names of subjects
English,science , maths .....
What I want is a formula to count how many classes has got English ,
How many classes has got Science. etc ....
Waiting
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
what version of excel are you using - please update your profile

As you could use Unique() Filter() etc if on the later version of excel

are you able to just count the number of times "english" appears in the column
using a
COUNTIF()

I feel there maybe more to this question?
if not

Then if you want to summarise the info or you could use a pivot table

Book1
ABCDE
1
21/1englishenglish3
3 1/2scienceScience1
4 1/3 2/5english
5 2/6
6 2/70english
Sheet1
Cell Formulas
RangeFormula
E2:E3E2=COUNTIF($B$2:$B$6,D2)
 
Upvote 0
First of all I am sorry but l explained wrongly what I want so I explained it again

I have two columns A and. B
Column A has names of classes in my school
eg. 1/1. 1/2. 1/3. 1/4.
2/1. 2/2. 2/3. 2/4. 2/5. etc
Column B has the names of subjects studied every time
English. Science. Maths. Arts
What l need is a formula to count how many first grade classes studied English
and how many second grade classes studied English
Hope I am clear
Using office 2010
 
Upvote 0
It will be easier if you change your Class names as below

Book2
ABCDEF
1Class/GradeSubjectClass/GradeA
2A1EnglishSubjectEnglish
3A2ScienceCount1
4A3Maths
5A4Arts
6B1English
7B2Science
8B3Maths
9B4Arts
10B5
11
12
Sheet1
Cell Formulas
RangeFormula
E3E3=COUNTIFS(A:A,$E$1&"*",B:B,$E$2)
 
Last edited:
Upvote 0
what is 1st grade and 2nd grade
is the the prefix
1/
2/

Book1
ABCDEF
1GradeSubjectNumber of Classes
21/1english1english2
31/2science1Science1
41/3english2english1
52/12Science0
62/7english
Sheet1
Cell Formulas
RangeFormula
F2:F5F2=COUNTIFS($A$2:$A$6,D2&"*",$B$2:$B$6,E2)
 
Upvote 0

Forum statistics

Threads
1,224,598
Messages
6,179,822
Members
452,946
Latest member
JoseDavid

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