How to Calculate Frequency Using COUNTIF Function in Excel

Method 1 – Using COUNTIF Function to Calculate Frequency in Excel

Steps:

  • Use the following formula in cell D17.
=COUNTIF($C$5:$C$14,"<="&B17)

The range of cells $C$5:$C$14 indicates the array of the Marks obtained by the students, and cell B17 refers to the 1st cell of the Number column.

  • Press ENTER.

Using COUNTIF with SUM Function to calculate frequency in Excel

You will have the frequency of Marks, which is less than or equal to 70 in cell D17.

  • Enter the formula given below in cell D18.
=COUNTIF($C$5:$C$14,"<="&B18)-SUM($D$17:D17)

Cell B18 indicates the 2nd cell of the Number column, and range $D$17:D17 represents the cells of the Frequency column.

Formula Breakdown

  • COUNTIF($C$5:$C$14,”<=”&B18)
    • Here, $C$5:$C$14 → It is the range argument.
    • “<=”&B18 → This refers to the criteria argument,
    • Output 6.
  • SUM($D$17:D17) → Returns the sum of the range $D$17:D17.
    • Output 3.
  • COUNTIF($C$5:$C$14,”<=”&B18)-SUM($D$17:D17) → 6-3.
    • Output → 3.
  • Hit ENTER.

You will have the frequency of Marks greater than 70 and less than or equal to 80 in cell D18, as shown in the following image.

  • Use the AutoFill option of Excel to get the rest of the outputs as demonstrated in the following picture.

Final output of method 1 to calculate frequency using the COUNTIF function in Excel


Method 2 – Calculating Frequency for Texts with Excel COUNTIF Function

Steps:

  • Apply the formula given below in cell C17.
=COUNTIF(C5:C14,"Passed")

The range of cells C5:C14 refers to the cells of the Status column.

  • Press ENTER.

You will have the number of students that get “Passed” status in the exam (see cell C17).

  • Enter the following formula in cell C18.
=COUNTIF(C5:C14,"Failed")
  • Hit ENTER.

You will have the following output on your worksheet, as shown in the image below.

Final output of method 2 to calculate frequency using the COUNTIF function in Excel


How to Count Frequency Using COUNTIFS Function in Excel

Steps:

  • Use the following formula in cell C17.
=COUNTIF($C$5:$C$14,"<="&B17)
  • Press ENTER.

to calculate frequency using the COUNTIF function in Excel

You will see the following output on your worksheet.

  • Apply the formula given below in cell C18.
=COUNTIFS($C$5:$C$14,">"&B17,$C$5:$C$14,"<="&B18)
  • Hit ENTER.

You will have the frequency of Marks that are greater than 70 but less than or equal to 80 in cell C18.

  • Use Excel’s AutoFill feature to get the rest of the frequencies, as demonstrated in the following image.

Final output of method 3 to Count Frequency Using COUNTIFS Function in Excel


How to Find Frequency of a Range in Excel

Steps:

  • Use the following formula in cell D17.
=FREQUENCY(C5:C14,B17:B20)

The range of cells C5:C14 refers to the cells of the Marks column, and B17:B20 indicates the cells of the Bins column.

  • Press ENTER.

How to Find Frequency of a Range in Excel

The FREQUENCY function will return the following outputs, as shown in the picture.

Final output of method 4 to Find Frequency of a Range in Excel


How to Count Frequency of Values in Multiple Columns in Excel

Steps:

  • Use the formula below in cell D17.
=COUNTIFS($D$5:$D$14,$B$17,$C$5:$C$14,C17)

The range of cells $D$5:$D$14 represents the cells of the Section column, cell $B$17 indicates the selected Section, and cell C17 represents the selected Status.

  • Hit ENTER.

How to Count Frequency of Values in Multiple Columns in Excel

You will have the frequency of the students of “Section A” that get “Passed” status in the exam.

  • Drag the Fill Handle to copy down the formula up to cell D18.

You will know the number of the students of “Section A”  who gather “Failed” status in the exam.

  • Enter the following formula in cell D19.
=COUNTIFS($D$5:$D$14,$B$19,$C$5:$C$14,C17)
  • Press ENTER.

Using COUNTIFS function to Count Frequency of Values in Multiple Columns in Excel

You will have the frequency of the students of Section B  that get “Passed” status in the exam in cell D19.

  • Drag the Fill Handle up to cell D20 to copy down the formula.

You will get the number of the students of Section B  that get “Failed” status in the exam (in cell D20), as demonstrated in the following picture.

Final output of method 5 to Count Frequency of Values in Multiple Columns in Excel


Download Practice Workbook


Related Articles


<< Go Back to Excel COUNTIF Function | Excel Functions | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Zahid Hasan
Zahid Hasan

Zahid Hassan, BSc, Industrial and Production Engineering, Bangladesh University of Engineering and Technology, has worked with Exceldmy for 1.5 years. He has written 95+ articles for Exceldemy. He has worked as an Excel & VBA Content Developer. He also worked as a VBA Developer for the Template team. Currently, he is working as a Junior Software Developer for the Excel Add-in project. He is interested in Software Development, Python, VBA, VB.NET, and Data Science, expanding his expertise in... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo