• Skip to main content
  • Skip to primary sidebar
  • Skip to secondary sidebar
  • Skip to footer

Computer Notes

Library
    • Computer Fundamental
    • Computer Memory
    • DBMS Tutorial
    • Operating System
    • Computer Networking
    • C Programming
    • C++ Programming
    • Java Programming
    • C# Programming
    • SQL Tutorial
    • Management Tutorial
    • Computer Graphics
    • Compiler Design
    • Style Sheet
    • JavaScript Tutorial
    • Html Tutorial
    • Wordpress Tutorial
    • Python Tutorial
    • PHP Tutorial
    • JSP Tutorial
    • AngularJS Tutorial
    • Data Structures
    • E Commerce Tutorial
    • Visual Basic
    • Structs2 Tutorial
    • Digital Electronics
    • Internet Terms
    • Servlet Tutorial
    • Software Engineering
    • Interviews Questions
    • Basic Terms
    • Troubleshooting
Menu

Header Right

Home » Excel » How to use the countif function in excel
Next →
← Prev

How to use the countif function in excel

By Dinesh Thakur

what is countif: countif function in excel is combination of count and if. If conditional statement which give us a result after comparing the condition and count statement count the cells. It is an inbuilt function of excel with predefined function outlay.

countif formula:

COUNTIF (range, criteria)

Range defines here cells and its value. Countif returns a numerical value after execution of command.
Criteria shows the condition according to that we access the data from spreadsheet.  criteria_range2, … criteria_range_n
Optional. It is the range of cells that you want to apply criteria2, … criteria_n .

We can also change it to make more formula using relational operator.

To use this excel countif example to understand it properly

Student_Name          

Marks

Rahul

32

Yogesh

54

Sohan

75

Rohit

Mohit

Rahat

Soniya

86

34

56

45

countif formula

1) COUNTIF (B2:B8,”34″)

countif function in excel

Counts the number of cells with marks ‘34’ (the value in B6) in cell B2:B8. The result is 1.

2) COUNTIF (B2:B8,”>32″)

count if greater than

Counts the number of cells with a value greater than 32 in cells From B2:B8.
And return the result 6.
3) COUNTIF (B2:B4,”<>”&B6)

count if with ampersand example

ampersand ‘&’ acts as a connecter between relational operator and cell value. Countif functions select the value from B2 to B4 cells and compare it with B6 value. After comparison functions return result 1.

4) Countif(B2:B4,”>32″)+countif(B4:B8,”<85″)

excel countif example

 Blue and green selection box show that range which we mention in countif formula like B2:B4 representing by blue and second selection range B4 to B8.

This countif formula give us combine result of the two formula ,in first we are fetching data >=32 and in second data<85.The Result is 7.

We can create More countif formula according to requirement like:

COUNTIF(B2:B8,”=34″)                            

Countif count the value from cell range B2 to B8 equate the value with 34 .And give result=0.

=COUNTIF(A2:A8,”=Rahul”)

It is not necessary that we can only compare with numerical data .We can also compare with text. After processing the result come out 1.

You’ll also like:

  1. How to use if condition in excel
  2. how to make a excel graph.
  3. Working with Excel 2010
  4. Write A C++ Program To Add, Subtract And Multiply Two Numbers By Using The Function Within Function Concept (Nesting Of Function).
  5. Write A C++ Program To Find The Sum Of: 1! /5+ 2! /4+ 3! /3+ 4! /2+ 5! /1 Without Using Function (Except Main Function). Where! Symbol Indicates Factorial Of Any Number.
Next →
← Prev
Like/Subscribe us for latest updates     

About Dinesh Thakur
Dinesh ThakurDinesh Thakur holds an B.C.A, MCDBA, MCSD certifications. Dinesh authors the hugely popular Computer Notes blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps.

Dinesh Thakur is a Freelance Writer who helps different clients from all over the globe. Dinesh has written over 500+ blogs, 30+ eBooks, and 10000+ Posts for all types of clients.


For any type of query or something that you think is missing, please feel free to Contact us.


Primary Sidebar

Excel 2010

Excel 2010 Tutorials

  • Excel - Started
  • Excel - Tour
  • Excel - BackStage View
  • Excel - Entering Values
  • Excel - Navigating Workbook
  • Excel - Save Workbook
  • Excel - Open/Close Worksheet
  • Excel - Managing Worksheet
  • Excel - Managing Data
  • Excel - Rows & Columns
  • Excel - Copy & Paste
  • Excel - Find & Replace
  • Excel - Spell Checker
  • Excel - Zoom In/Out
  • Excel - Paginated View
  • Excel - Insert Comments
  • Excel - Insert Text Box
  • Excel - Undo/Redo
  • Excel - Formatting Cells
  • Excel - Formatting Worksheets
  • Excel - Working with Formula
  • Excel - Quick Access Toolbar
  • Excel - Name Field
  • Excel - Formula Bar
  • Excel - Status Bar
  • Excel - Full Screen Mode
  • Excel - Grid and Indexing Fields
  • Excel - Preferences Window
  • Excel - Color Scheme

Ribbon Tab

  • Excel - Ribbon Tabs
  • Excel - Show and Hide Ribbon
  • Excel - Adding Ribbon Groups
  • Excel - Active Label of Ribbon Group
  • Excel - Customizing the Ribbon
  • Excel - Contextual Ribbon Tabs

Other Links

  • Excel - PDF Version

Footer

Basic Course

  • Computer Fundamental
  • Computer Networking
  • Operating System
  • Database System
  • Computer Graphics
  • Management System
  • Software Engineering
  • Digital Electronics
  • Electronic Commerce
  • Compiler Design
  • Troubleshooting

Programming

  • Java Programming
  • Structured Query (SQL)
  • C Programming
  • C++ Programming
  • Visual Basic
  • Data Structures
  • Struts 2
  • Java Servlet
  • C# Programming
  • Basic Terms
  • Interviews

World Wide Web

  • Internet
  • Java Script
  • HTML Language
  • Cascading Style Sheet
  • Java Server Pages
  • Wordpress
  • PHP
  • Python Tutorial
  • AngularJS
  • Troubleshooting

 About Us |  Contact Us |  FAQ

Dinesh Thakur is a Technology Columinist and founder of Computer Notes.

Copyright © 2025. All Rights Reserved.

APPLY FOR ONLINE JOB IN BIGGEST CRYPTO COMPANIES
APPLY NOW