Use COUNTIFS in WPS Spreadsheets to Count Applications by University and Subject
Question details
Count applications for each university in column A, restricted to a subject such as Law.

- Product
- WPS Spreadsheets or Microsoft Excel
- Device & OS
- not provided
- Scenario
- University names are listed in column A, while application records contain universities in column F and subjects in column G.
- Observed behavior
- Column B should show the number of application rows matching both the university in column A and the selected subject.
Check that each application occupies one row, with its university in column F and subject in column G. Confirm that rows 2 through 14 cover the records you want to count, or adjust both ranges to match your data.
Use COUNTIFS to match the university and subject
Use this formula to count rows that match both the university in column A and the subject Law.
Open your spreadsheet and select cell B2, next to the first university in A2.
Type =COUNTIFS($G$2:$G$14,"Law",$F$2:$F$14,A2) in B2 and press Enter.
Select B2 and drag the fill handle down column B for the remaining universities. The A2 reference changes for each row, while the application ranges stay fixed.

Count university applications by subject in WPS Spreadsheets
Open your application data in WPS Spreadsheets and use COUNTIFS to calculate a separate subject-specific count for each university.
- 1. Open the spreadsheet: Launch WPS Spreadsheets and open the workbook containing your application records.
- 2. Select B2: Click cell B2 beside the university name in A2.
- 3. Enter COUNTIFS: Enter =COUNTIFS($G$2:$G$14,"Law",$F$2:$F$14,A2) and press Enter.
- 4. Copy the formula down: Drag the fill handle from B2 down to the other university rows.

Frequently Asked Questions
How do I count a subject other than Law?
In the formula in B2, replace "Law" with the desired subject, such as "History", and press Enter.
Can I put the subject in a cell instead of typing it in the formula?
Yes. If the subject is in D1, use =COUNTIFS($G$2:$G$14,$D$1,$F$2:$F$14,A2). Change D1 to count a different subject.
Why does the formula return zero?
Check that the university in A2 and the subject match the entries in columns F and G. Also check for extra spaces and make sure both ranges include the application rows.
What do the dollar signs in the formula do?
The dollar signs lock the ranges $G$2:$G$14 and $F$2:$F$14 when you fill the formula down. The A2 reference remains relative so it changes to A3, A4, and so on.




