Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • How to sum a total in multiple Excel tables
  • Example of COUNTIFS with variable table column in Excel
  • Understanding Anova in Excel
  • How to Create One and Two Variable Data Tables in Excel
  • Conditional Formatting Color Scales Examples in Excel

References

  • Lookup entire row in Excel
  • Two-column Lookup in Excel
  • How to use Excel FORMULATEXT function
  • VLOOKUP function: Description, Usage, Syntax, Examples and Explanation
  • How to create dynamic named range with OFFSET in Excel

Data Validations

  • How To Create Drop-down List in Excel
  • Excel Data validation date in next 30 days
  • Excel Data validation with conditional list
  • Data validation must not exist in list
  • Excel Data validation must not contain

Tag: COUNTIF function

Count cells that contain either x or y in Excel

by

This tutorial shows how to Count cells that contain either x or y in Excel using the example below; Formula =SUMPRODUCT(–((ISNUMBER(FIND(“abc”,range)) + ISNUMBER(FIND(“def”,range)))>0)) Explanation To count cells that contain either one value or another, you an either use a helper column then tally up the count, or a more complex single cell formula. Background When …

Continue Reading

Count cells that contain five characters

by

This tutorial shows how to Count cells that contain five characters using the example below; Formula =COUNTIF(range,”?????”) Explanation To count the number of cells that contain a certain number of characters text, you can use the COUNTIF function. In the example above  “?” is a wildcard matching any single character. In the example, the active cell contains this formula: …

Continue Reading

Count cells that contain negative numbers

by

This tutorial shows how to Count cells that contain negative numbers using the example below; Formula =COUNTIF(range,”<0″) Explanation To count the number of cells that contain negative numbers in a range of cells, you can use the COUNTIF function. In the example, the active cell contains this formula: =COUNTIF(B2:B6,”<0″) How this formula works COUNTIF counts the number …

Continue Reading

Count cells that contain specific text in Excel

by

This tutorial shows how to Count cells that contain specific text in Excel using the example below; Formula =COUNTIF(range,”*text*”) Explanation To count the number of cells that contain certain text, you can use the COUNTIF function. In the example above “*” is a wildcard matching any number of characters. In the example, the active cell contains this formula: =COUNTIF(B4:B11,”*a*”) …

Continue Reading

Running count of occurrence in list in Excel

by

This tutorial shows how to work Running count of occurrence in list in Excel using the example below; Formula =COUNTIF($A$1:A1,value) Explanation To create a running count of certain values that appear in range of cells, you can use the COUNTIF with a “mixed reference” to create a running total. In the example shown, the formula in C5 …

Continue Reading

COUNTIF with non-contiguous range in Excel

by

This tutorial shows how to COUNTIF with non-contiguous range in Excel using the example below; Formula =SUM(COUNTIF(INDIRECT({“range1″,”range2″,”range3”}),criteria)) Explanation To use count a non-contiguous range with criteria, you can use the COUNTIF function together with INDIRECT and SUM. In the example shown, cell I5 contains this formula: =SUM(COUNTIF(INDIRECT({“B5:B8″,”D7:D10″,”F6:F11″}),”>50″)) How this formula works COUNTIF counts the number of …

Continue Reading

Count unique values in a range with COUNTIF in Excel

by

This tutorial shows how to Count unique values in a range with COUNTIF in Excel. using the example below; Formula =SUMPRODUCT(1/COUNTIF(data,data)) Explanation If you need to count the number of unique values in a range of cells (named “data” in the example below), you can use a formula that uses COUNTIF and SUMPRODUCT. How the …

Continue Reading

Count unique text values in a range in Excel

by

This tutorial shows how to Count unique text values in a range in Excel using the example below; Formula =SUMPRODUCT(–(FREQUENCY(MATCH(data,data,0),ROW(data)-ROW(data.firstcell)+1)>0)) Explanation If you need to count unique text values in a range, you can use a formula that uses several functions: FREQUENCY , MATCH, ROW and SUMPRODUCT. It’s also possible to use COUNTIF, as explained …

Continue Reading

Count total matches in two ranges in Excel

by

This tutorial shows how to Count total matches in two ranges in Excel using the example below; Formula =SUMPRODUCT(COUNTIF(range1,range2)) Explanation If you want to compare two ranges, and count total matches between the two ranges, you can use a formula that combines the COUNTIF and  SUMPRODUCT functions. Context Suppose you have a “master” list of some …

Continue Reading

Count occurrences in entire Excel Workbook

by

This tutorial shows how to Count occurrences in entire Excel Workbook using the example below; Formula =SUMPRODUCT(COUNTIF(INDIRECT(“‘”&sheets&”‘!”&range),criteria)) Explanation To count matches in entire workbook, you can use a formula based on the COUNTIF and SUMPRODUCT functions. In the example shown, the formula in D5 is: =SUMPRODUCT(COUNTIF(INDIRECT(“‘”&sheets&”‘!A1:Z10000″),B5)) where “sheets” is the named range B8:B10. Context This …

Continue Reading

Count long numbers without COUNTIF in Excel

by

This tutorial shows how to Count long numbers without COUNTIF in Excel using the example below; Formula =SUMPRODUCT(–(A:A=A1)) Explanation This is an annoyingly long introduction, but the context is important, sorry! If you try to count very long numbers (16+ digits) in a range with COUNTIF, you may see incorrect results, due to a bug …

Continue Reading

Count cells that end with in Excel

by

This tutorial shows how to Count cells that end with in Excel using the example below; Formula =COUNTIF(range,”*text”) Explanation To count the number of cells that end with specific text, you can use the COUNTIF function. In the example above “*” is a wildcard matching any number of characters and cell F4 contains this formula: =COUNTIF(B4:B11,”*r”) How the …

Continue Reading

Count cells that do not contain in Excel

by

This tutorial shows how to Count cells that do not contain in Excel using the example below; Formula =COUNTIF(range,“<>*text*”) Explanation To count the number of cells that do not contain certain text, you can use the COUNTIF function. In the example above “*” is a wildcard matching any number of characters. In the example, the …

Continue Reading

Count cells that contain text in Excel

by

This tutorial shows how to Count cells that contain text in Excel using the example below; Formula =COUNTIF(range,”*”) Explanation To count the number of cells that contain text (i.e. not numbers, not errors, not blank), use the COUNTIF function and a wildcard. “*” is a wildcard matching any number of characters. Do you want to count …

Continue Reading

Count cells that contain positive numbers in Excel

by

This tutorial shows how to Count cells that contain positive numbers in Excel using the example below; Formula =COUNTIF(range,”>0″) Explanation To count positive numbers in a range of cells, you can use the COUNTIF function. In the example, the active cell contains this formula: =COUNTIF(B2:B6,”>0″) How this formula works COUNTIF counts the number of cells …

Continue Reading

COUNTIF function: Description, Usage, Syntax, Examples and Explanation

by

What is COUNTIF function in Excel? COUNTIF function is one of Statistical functions in Microsoft Excel used to count the number of cells that meet a criterion; for example, to count the number of times a particular city appears in a customer list.In its simplest form, COUNTIF says: =COUNTIF(Where do you want to look?, What …

Continue Reading

How to retrieve first match between two ranges in Excel

by

To retrieve the first match in two ranges of values, you can use a formula based on the INDEX, MATCH, and COUNTIF functions. Formula =INDEX(range2,MATCH(TRUE,COUNTIF(range1,range2)>0,0)) Explanation In the example shown, the formula in G5 is: =INDEX(range2,MATCH(TRUE,COUNTIF(range1,range2)>0,0)) where “range1” is the named range B5:B8, “range2” is the named range D5:D7. How this formula works In this example the named range …

Continue Reading

How to test for all values in a range are at least in Excel

by

To test if all values in a range are at least a certain threshold value, you can use the COUNTIF function together with the NOT function. Formula =NOT(COUNTIF(range,”<65″)) Explanation In the example shown, the formula in G5 is: =NOT(COUNTIF(B5:F5,”<65″)) How this formula works At the core, this formula uses the COUNTIF function to count any …

Continue Reading

Check multiple cells have same value in Excel

by

To confirm that a range of cells all have the same value, you can use a formula based on the COUNTIF function. See illustration below: Formula =COUNTIF(range,”<>value”)=0 Explanation  In the example shown, the formula in C9 is: =COUNTIF(C5:C8,”<>ok”)=0 Note: this formula is not case-sensitive, you can find a case-sensitive formula here. How this formula works This …

Continue Reading

Check if multiple cells have same value in Excel

by

To confirm that a range of cells all have the same value, you can use a formula based on the COUNTIF function. Formula =COUNTIF(range,”<>value”)=0 Explanation In the example shown, the formula in C9 is: =COUNTIF(C5:C8,”<>ok”)=0 Note: this formula is not case-sensitive, you can find a case-sensitive formula here. How this formula works This formula relies on …

Continue Reading

Basic text sort formula in Excel

by

To dynamically sort text values in alphabetical order, you can use use a formula based on the COUNTIF function. Formula =COUNTIF(range,”<=”&A1) Explanation In the example shown, the formula in C5 is: =COUNTIF(countries,”<=”&B5) where “countries” is the named range B4:B13 How this formula works This formula uses the “greater than or equal to” operator with text, something you …

Continue Reading

Basic numeric sort formula in Excel

by

To dynamically sort data that contains only numeric values, you can use a helper column and a formula created with the RANK and COUNTIF functions. Formula =RANK(A1,values)+COUNTIF(exp_rng,A1)-1 Note: this formula is the set-up for a formula that can extract and display data using a predefined sort order in a helper column. One example here. Explanation In the example shown, the …

Continue Reading

One way to track attendance using Excel formula

by

This tutorial shows b.asic attendance tracking formula in Excel One way to track attendance is with simple formulas based on the COUNTIF function. Formula =COUNTIF(range,”x”) Explanation In the example shown, the formula in M5 is: =COUNTIF(C5:L5,”x”) How this formula works This formula simply uses COUNTIF with a criteria of “x” (not quotation marks) to count …

Continue Reading

How to count specific words in a range in Excel

by

To count how many times a specific a word (or any substring) appears inside a range of cells, you can use a formula based on the SUBSTITUTE, LEN, and SUMPRODUCT functions.  Formula =SUMPRODUCT((LEN(range)-LEN(SUBSTITUTE(range,text,””)))/LEN(text)) Explanation In the example shown, the formula in C11 is: =SUMPRODUCT((LEN(B5:B8)-LEN(SUBSTITUTE(B5:B8,C2,””)))/LEN(C2)) Note: The formula on this page counts instances of a word in a …

Continue Reading

Posts navigation

  • Previous
  • 1
  • 2

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • Nested IF function example in Excel
  • How to use Excel FALSE Function
  • FALSE function: Description, Usage, Syntax, Examples and Explanation
  • XOR function: Description, Usage, Syntax, Examples and Explanation
  • TRUE function: Description, Usage, Syntax, Examples and Explanation

Date Time

  • How to calculate working days left in month in Excel
  • Pad week numbers with zeros in Excel
  • How to get workdays between dates in Excel
  • Count holidays between two dates in Excel
  • Convert Unix time stamp to Excel date

Grouping

  • Map inputs to arbitrary values in Excel
  • How to randomly assign data to groups in Excel
  • Group times into unequal buckets in Excel
  • Group numbers with VLOOKUP in Excel
  • How to randomly assign people to groups in Excel

General

  • Find, Select, Replace and Go To Special in Excel
  • Freeze and Unfreeze Panes in Excel
  • How to calculate profit margin percentage in Excel
  • Create dynamic workbook reference to another workbook in Excel
  • Select, Insert, Rename, Move, Delete Worksheets in Excel
© 2025 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning