Excel COUNTIF Examples – Not Blank, Greater Than, Duplicate or Unique

May 2, 2017 | Author: bluebird1969 | Category: N/A
Share Embed Donate


Short Description

Excel COUNTIF Examples...

Description

6/29/2015

Excel COUNTIF examples – not blank, greater than, duplicate or unique

HOME

PRODUCTS

DOWNLOADS

SUPPORT

FORUMS

BLOG

ABOUT US

PURCHASE

COUNTIF in Excel - count if not blank, greater than, duplicate or unique by Svetlana Cheusheva

Jul

Excel, Excel duplicates, Excel functions, Excel tips

223 Comments

2 Microsoft Excel provides several functions purposed for counting different kinds of cells, such as blanks or non-blanks, with number, date or text values, containing specific words or character, etc.

Excel: featured articles

In this article, we will focus on the Excel COUNTIF function that is purposed for counting cells with the condition you specify. First, we will briefly cover the syntax and general usage, and then I provide a number of examples and warn about possible quirks when using this function with multiple criteria and specific types of cells.

VLOOKUP in Excel – tutorial with formula examples

In essence, COUNTIF formulas are identical in all Excel versions, so you can use the examples from this tutorial in Excel 2013, 2010, 2007 and 2003. Excel COUNTIF function - syntax and usage Examples of how to use COUNTIF in Excel COUNTIF formula for text and numbers (exact match) COUNTIF with wildcard characters (partial match) Count if blank or not blank Count if greater than, less than or equal to COUNTIF formulas for dates Excel COUNTIF with multiple criteria Count duplicates and unique values Excel COUNTIF - frequently asked questions and issues

COUNTIF function in Excel - syntax and usage Excel COUNTIF function is used for counting cells within a specified range that meet a certain criterion, or condition.

How to use Excel COUNTIFS and COUNTIF with multiple criteria

Creating a drop down list: static, dynamic, from another workbook Excel formulas for conditional formatting based on another cell value COUNTIF in Excel - count if not blank, greater than, duplicate or unique Using IF function: formulas for numbers, text, dates, blank cells How to use Excel SUMIFS and SUMIF with multiple criteria Change background color based on cell value INDEX & MATCH functions in Excel - a better alternative to VLOOKUP

Outlook: featured articles

For example, you can write a COUNTIF formula to find out how many cells in your worksheet

How to sync Google Calendar with Outlook

contain a number greater than or less than the number you specify. Another typical use of COUNTIF in Excel is for counting cells with a specific word or starting with a particular letter(s).

How to fix "Cannot start Microsoft Outlook" error

The syntax of the COUNTIF function is very simple:

Merge duplicate contacts in

COUNTIF(range, criteria)

Outlook

As you see, there are only 2 arguments, both of which are required:

Remove duplicate emails in

range - defines one or several cells to count. You put the range in a formula like you usually do in Excel, e.g. A1:A20. criteria - defines the condition that tells the function which cells to count. It can be a number,

Outlook 2010 and 2013 quickly and safely How to create and use e-mail templates in Outlook

text string, cell reference or expression. For instance, you can use the criteria like these: "10", A2, ">=10", "some text". And here is the simplest example of Excel COUNTIF function. What you see in the image below is the list of the best tennis players for the last 14 years. The formula =COUNTIF(C2:C15,"Roger Federer")counts how many times Roger Federer's name is on the list:

Excel Excel charts

Excel add-ins Excel consolidation

Excel duplicates

Excel formatting

Excel fun

Excel functions https://www.ablebits.com/office-addins-blog/2014/07/02/excel-countif-examples/#countif-syntax

1/56

6/29/2015

Excel COUNTIF examples – not blank, greater than, duplicate or unique Excel PivotTables

Excel randoms

Excel tips

Excel Vlookup

Merge data in Excel Microsoft Office

Microsoft Word

new release

Office 365 tips

Office fun

Office news

Office tips

Outlook

Outlook add-ins

Outlook BCC

Outlook calendar Outlook duplicates

Outlook templates PowerPoint

Outlook tips

Video

Sign in Note. A criterion is case insensitive, meaning that if you type "roger federer" as the criteria in the above formula, this will produce the same result.

Register Log in

Excel COUNTIF function examples As you have just seen, the syntax of the COUNTIF function is very simple. However, it allows for many possible variations of the criteria, including wildcard characters, the values of other cells, and even other Excel functions. This diversity makes the COUNTIF function really powerful and fit for many tasks, as you will see in the examples that follow.

COUNTIF formula for text and numbers (exact match) In fact, we discussed the COUNTIF function that counts text values matching a specified criterion exactly a moment ago. Let me remind you that formula for cells containing an exact string of text: =COUNTIF(C2:C15,"Roger Federer"). So, you enter: A range as the first parameter; A comma as the delimiter; A word or several words enclosed in quotes as the criteria. Instead of typing text, you can use a reference to any cell containing that word or words and get absolutely the same results, e.g. =COUNTIF(C1:C9,C7). Similar COUNTIF formulas work for numbers as well as for text values. As you can see in the screenshot below, the formula =COUNTIF(D2:D9,5)perfectly counts cells with quantity 5 in Column D.

Ultimate Suite for Excel Professionals

COUNTIF formulas with wildcard characters (partial match) In case your Excel data include several variations of the keyword(s) you want to count, then you can use a wildcard character to count all the cells containing a certain word, phrase or letters as part of the cell's contents.

https://www.ablebits.com/office-addins-blog/2014/07/02/excel-countif-examples/#countif-syntax

2/56

6/29/2015

Excel COUNTIF examples – not blank, greater than, duplicate or unique

Suppose, you have a list of tasks assigned to different persons, and you want to know the number of tasks assigned to Danny Brown. Because Danny's name is written in several different ways, we enter "*Brown*" as the search criteria =COUNTIF(D2:D10, "*Brown*").

An asterisk (*) is used to find cells with any sequence of leading and trailing characters, as illustrated in the above example. If you need to match any single character, enter a question mark (?) instead, as demonstrated below.

Count cells beginning or ending with certain characters You can use either wildcard character, asterisk (*) or question mark (?), with the criterion depending on which exactly result you want to achieve. If you want to know the number of cells that start or end with certain text no matter how many other characters a cell contains, use these formulas: =COUNTIF(C2:C10,"Mr*")- count cells that begin with "Mr". =COUNTIF(C2:C10,"*ed")- count cells that end with the letters "ed". The image below demonstrates the second formula in action:

If you are looking for a count of cells that start or end with certain letters and contain the exact number of characters, you use the Excel COUNTIF function with the question mark character (?) in the criteria: =COUNTIF(D2:D9,"??own")- counts the number of cells ending with the letters "own" and having exactly 5 characters in cells D2 through D9, including spaces. =COUNTIF(D2:D9,"Mr??????")- counts the number of cells starting with the letters "Mr" and having exactly 8 characters in cells D2 through D9, including spaces. Tip. To find the number of cells containing an actual question mark or asterisk, type a tilde (~) before the ? or * character in the formula. For example, =COUNTIF(D2:D9,"*~?*")will count all cells containing the question mark in the range D2:D9.

Excel COUNTIF for blank and non-blank cells These formula examples demonstrate how you can use the COUNTIF function in Excel to count the number of empty or non-empty cells in a specified range.

https://www.ablebits.com/office-addins-blog/2014/07/02/excel-countif-examples/#countif-syntax

3/56

6/29/2015

Excel COUNTIF examples – not blank, greater than, duplicate or unique

COUNTIF not blank In some of other Excel COUNTIF tutorials, you may come across formulas for counting nonblank cells in Excel similar to this one: =COUNTIF(range,"*") But the fact is, the above formula counts all cells that contain any text, meaning that cells with dates and numbers will be treated as blank cells! If you need a universal COUNTIF formula for counting all non-blank cells in a specified range, here you go: =COUNTIF(range,""&"") This formula works correctly with all value types - text, dates and numbers - as you can see in the screenshot below.

COUNTIF blank If you want the opposite, i.e. count blank cells in a certain range, you should adhere to the same approach - use a formula with a wildcard character for text values or another one (with the "" criteria) to count all empty cells. Formula to count cells not containing any text: =COUNTIF(range,""&"*") Translated into plain English, the criteria used in the above formula (""&"*") means to find cells not equal to *, i.e. not containing any text in the specified range. Universal COUNTIF formula for blanks (all value types): =COUNTIF(range,"") The above formula correctly handles numbers, dates and text values. For example, the formula =COUNTIF(C2:C11,"")returns the number of all empty cells in the range C2:C11. Note. Please be aware that Microsoft Excel provides another function for counting blank cells =COUNTBLANK(range). For instance, the below formulas will produce exactly the same results as the COUNTIF formulas you see in the screenshot above: Count blanks: =COUNTBLANK(C2:C11) Count non-blanks: =ROWS(C2:C11)*COLUMNS(C2:C11)-COUNTBLANK(C2:C11) Also, please keep in mind that both =COUNTIF(range,"")and =COUNTBLANK(range)count cells with formulas that only look empty. If you do not want to treat such cells as blanks, use this formula instead: =ROWS(C2:С11)*COLUMNS(C2:С11)-COUNTIF(C2:С11,""&""). For more information about counting blanks and not blanks in Excel, see the following tutorials: 3 ways to count empty cells in Excel and How to count non-empty cells in Excel.

COUNTIF greater than, less than or equal to To count cells with values greater than, less than or equal to the number you specify, you simply add a corresponding operator to the criteria, as shown in the table below. Please pay attention that in COUNTIF formulas, an operator with a number are always enclosed in quotes.

https://www.ablebits.com/office-addins-blog/2014/07/02/excel-countif-examples/#countif-syntax

4/56

6/29/2015

Excel COUNTIF examples – not blank, greater than, duplicate or unique

Criteria

Formula Example

Description

Count if greater than

=COUNTIF(A2:A10,">5")

Count cells where value is greater than 5.

Count if less than

=COUNTIF(A2:A10,"=5")

Count cells where value is greater than

Count if greater than or equal to Count if less than or equal to

or equal to 5. =COUNTIF(C2:C8,""&D3):

If you want to count cells that contain an actual operator as part of the cell's contents, i.e. the characters ">", "5*")will count all cells in the range D2:D9 with contents like this "Delivery >5 days" or ">5 available".

Using Excel COUNTIF function with dates If you want to count cells with dates that are greater than, less than or equal to the date you specify or date in another cell, you proceed in the already familiar way using formulas similar to the ones we discussed a moment ago. All of the above formulas work for dates as well as for numbers. Let me give you just a few examples: Criteria

Formula Example

Description

Count dates equal to the specified date.

=COUNTIF(B2:B10,"6/1/2014")

Counts the number of cells in the range B2:B10 with the date 1-Jun-2014.

Count dates greater than or

=COUNTIF(B2:B10,">=6/1/2014")

equal to another date.

Count the number of cells in the range B2:B10 with a date greater than or equal to 6/1/2014.

Count dates greater than or equal to a date in another cell, minus x days.

=COUNTIF(B2:B10,">="&B2-"7")

Count the number of cells in the range B2:B10 with a date greater than or equal to the date in B2 minus 7 days.

Apart from these common usages, you can utilize the COUNTIF function in conjunction with

https://www.ablebits.com/office-addins-blog/2014/07/02/excel-countif-examples/#countif-syntax

5/56

6/29/2015

Excel COUNTIF examples – not blank, greater than, duplicate or unique

specific Excel Date and Time functions such as TODAY() to count cells based on the current date. Criteria

Formula Example

Count dates equal to the current date.

=COUNTIF(A2:A10,TODAY())

Count dates prior to the current date, i.e.

=COUNTIF(A2:A10,""&TODAY())

greater than today. Count dates that are due in a week.

=COUNTIF(A2:A10,"="&TODAY()+7)

Count dates in a specific date range.

=COUNTIF(B2:B10, ">=6/7/2014")COUNTIF(B2:B10, ">6/1/2014")

Here is an example of using such formulas on real data (at the moment of writing today was 25-Jun-2014):

Excel COUNTIF with multiple criteria In fact, Excel COUNTIF function is not exactly purposed for counting cells based on multiple criteria. There is another function, COUNTIFS, especially designed for this (it is the topic of the next week's article). However, you can use COUNTIF to count values based on two or more criteria by adding or subtracting several COUNTIF functions. Example 1. COUNTIF with two conditions for numbers One of the most common applications of Excel COUNTIF function with 2 criteria is counting numbers within a specific range, i.e. less than X but greater than Y. For example, you can use the following formula to count cells in the range B2:B9 where a value is greater than 5 and less than 15. =COUNTIF(B2:B9,">5")-COUNTIF(B2:B9,">=15")

https://www.ablebits.com/office-addins-blog/2014/07/02/excel-countif-examples/#countif-syntax

6/56

6/29/2015

Excel COUNTIF examples – not blank, greater than, duplicate or unique

Example 2. COUNTIF with multiple conditions for text values Let's consider one more example of the COUNTIF function that will count 2 different text values. Suppose you have a shopping list and you want to find out how many soft drinks are included. So, the following formula works a treat: =COUNTIF(B2:B13,"Lemonade")+COUNTIF(B2:B13,"*juice") Please pay attention to the wildcard character (*) in the second criterion, it is used to count all kinds of juice on the list.

In the same manner, you can write a COUNTIF formula with several conditions. Here is an example of the COUNTIF function with multiple conditions that counts lemonade, juice and ice cream: =COUNTIF(B2:B13,"Lemonade") + COUNTIF(B2:B13,"*juice") + COUNTIF(B2:B13,"Ice cream") You can find plenty more examples for text, numbers and dates in this tutorial - Excel COUNTIFS and COUNTIF with multiple criteria.

Using COUNTIF function to find duplicates and unique values Another possible usage of the COUNTIF function in Excel is for finding duplicates in one column, between two columns, or in a row. Example 1. Find and count duplicates in 1 column For example, this simple formula =COUNTIF(B2:B10,B2)>1 will spot all duplicate entries in the range B2:B10 while another function =COUNTIF(B2:B10,TRUE) will tell you how many dupes are there:

Example 2. Count duplicates between two columns

https://www.ablebits.com/office-addins-blog/2014/07/02/excel-countif-examples/#countif-syntax

7/56

6/29/2015

Excel COUNTIF examples – not blank, greater than, duplicate or unique

If you have two separate lists, say lists of names in columns B and C, and you want to know how many names appear in both columns, you can use Excel COUNTIF in combination with the SUMPRODUCT function to count duplicates: =SUMPRODUCT((COUNTIF(B2:B1000,C2:C1000)>0)*(C2:C1000"")) We can even take a step further and count how many unique names there are in Column C, i.e. names that do NOT appear in Column B: =SUMPRODUCT((COUNTIF(B2:B1000,C2:C1000)=0)*(C2:C1000""))

Tip. If you want to highlight duplicate cells or entire rows containing duplicate entries, you can create conditional formatting rules based on the COUNTIF formulas, as demonstrated in this tutorial - Excel conditional formatting formulas to highlight duplicates. Example 3. Count duplicates and unique values in a row If you want to count duplicates or unique values in a certain row rather than a column, use one of the below formulas. These formulas might be helpful, say, to analyze the lottery draw history. Count duplicates in a row: =SUMPRODUCT((COUNTIF(A2:I2,A2:I2)>1)*(A2:I2"")) Count unique values in a row: =SUMPRODUCT((COUNTIF(A2:I2,A2:I2)=1)*(A2:I2""))

Excel COUNTIF - frequently asked questions and issues I hope these examples have helped you to get a feel for the Excel COUNTIF function. If you've tried any of the above formulas on your data and were not able to get them to work or are having a problem with the formula you created, please look through the following 5 most common issues. There is a good chance that you will find the answer or a helpful tip there.

1. COUNTIF on a non-contiguous range of cells Question: How can I use COUNTIF in Excel on a non-contiguous range or a selection of cells? Answer: Excel COUNTIF does not work on non-adjacent ranges, nor does its syntax allow specifying several individual cells as the first parameter. Instead, you can use a combination of several COUNTIF functions:

https://www.ablebits.com/office-addins-blog/2014/07/02/excel-countif-examples/#countif-syntax

8/56

6/29/2015

Excel COUNTIF examples – not blank, greater than, duplicate or unique

Wrong: =COUNTIF(A2,B3,C4,">0") Right: =COUNTIF(A2,">0") + COUNTIF(B3,">0") + COUNTIF(C4,">0") An alternative way is using the INDIRECT function to create an array of ranges. For example, both of the below formulas produce the same result you see in the screenshot: =SUM(COUNTIF(INDIRECT({"B2:B8","D2:C8"}),"=0")) =COUNTIF($B2:$B8,0) + COUNTIF($C2:$C8,0)

2. Ampersand and quotes in COUNTIF formulas Question: When do I need to use an ampersand in a COUNTIF formula? Answer: This is probably the most arcane part. I personally find the syntax of the COUNTIF function very confusing, though if you give it some thought, you'll see the reasoning behind it. An ampersand and quotes are needed to construct a text string for the argument. So, you can adhere to these rules: If you use a number or a cell reference in the exact match criteria, you need neither ampersand nor quotes, e.g. or =COUNTIF(A1:A10,10)or =COUNTIF(A1:A10,C1). If your criteria includes text, wildcard character or some operator with a number, you enclose it in quotes, e.g. =COUNTIF(A2:A10,"lemons")or =COUNTIF(A2:A10,"*")or =COUNTIF(A2:A10,">5") If you use an expression with a cell reference or another Excel function, you have to use the quotes ("") to start a text string and ampersand (&) to concatenate and finish the string off. For example, =COUNTIF(A2:A10,">"&D2)or =COUNTIF(A2:A10," Tables > PivotTable). - Place your pivot table onto a new sheet. - Drag and drop the column with the formula to the Rows section and column A to the

https://www.ablebits.com/office-addins-blog/2014/07/02/excel-countif-examples/#countif-syntax

10/56

6/29/2015

Excel COUNTIF examples – not blank, greater than, duplicate or unique Values section. Reply

2

Richard says: July 24, 2014 at 12:12 pm Hello, I want to formulate the following: IF "cell value A" greater than(>) "cell value B", THEN "cell value A" = "cell value B" and therefore the result "cell value C" is equal to zero if this is doable can it be applied to multiple "cells"? Reply Svetlana Cheusheva says: July 25, 2014 at 8:07 am Hi Richard, I understand your condition but cannot figure out what result you want to achieve : ) If you want a formula to add a zero to column C if a value in cell A in the same row is greater than in cell B, you can use the following IF formula: =IF($A2>$B2,0,"") where 2 is your first row with data. Since we use a relative row reference (without the $ sign) the formula with compare values in each individual row when copied across multiple cell. If you are looking for some other result, please clarify. Reply

3

Kelly-Ann says: July 31, 2014 at 4:32 pm Hi There, I am trying to record attendance at my office and I am putting together an excel spreadsheet to store the data. I need to be able to sum up the totals of vacation days, personal days, business days, and sick days. The countif works well if I put 'V' for vacation, 'B' for business and so forth, but how can I calculate half days? Is there a way that I can set up a second Countif function so when I put in something like 'VH' in the range it counts it as 0.5 rather than one? Pretty much I am wondering if I can change the amount that the countif function counts by. Thanks Reply Svetlana Cheusheva says: August 1, 2014 at 7:14 am Hi Kelly-Ann, I think you can just multiply the result of COUNTIF for "VH" by 0.5 to count half days, e.g.: =COUNTIF(RANGE, "V") + 0.5*COUNTIF(RANGE, "VH") Reply

4

Clare says: August 4, 2014 at 10:05 am Hi, I have a project list where activity is shown in a timeline. I need to count up if a column 'project stage' shows activity in any given month. I have set the countif for picking up activity but now need to make it so that it only counts that activity if column 'project stage' is a particular word. Any idea? BTW the above is great! Reply Svetlana Cheusheva says: August 4, 2014 at 1:01 pm Hi Clare,

https://www.ablebits.com/office-addins-blog/2014/07/02/excel-countif-examples/#countif-syntax

11/56

6/29/2015

Excel COUNTIF examples – not blank, greater than, duplicate or unique You need to use the COUNTIFS function that allows setting multiple criteria in a formula. Something similar to this: =COUNTIFS(C2:C9, ">=6/1/2014", C2:C9, "=$A$1, IF(D10,"Duplicate","Unique") Reply

61

Kimball High says: November 21, 2014 at 11:14 pm Just wanted to say a big THANK YOU for this article. Buried in the article is a short paragraph about how to use the symbols as text in a countif(s) and it has really helped. Thank you for taking the time to publish this comprehensive explanation. Reply

62

ALi says: November 24, 2014 at 8:02 am need to distinct sum ,distinct count,Distinct Average

https://www.ablebits.com/office-addins-blog/2014/07/02/excel-countif-examples/#countif-syntax

31/56

6/29/2015

Excel COUNTIF examples – not blank, greater than, duplicate or unique values in cell can be blank. if have found two way to do distinct count but could not found how i can do the other =SUMPRODUCT((A3:A21"")/COUNTIF(A3:A21,A3:A21&"")) =COUNT(IF(FREQUENCY(B3:B21,B3:B21)>0,B3:B21)) Reply

63

Willie Alvarez says: November 25, 2014 at 2:46 pm I have a very long table. This is just an example of the table: A1: Joe 6:00 am 7:00 am 8:00 am 9:00 am User Date Activity Description Joe 11/4/14 6:10:08 am Build Build Joe 11/4/14 6:10:10 am Build Build Joe 11/4/14 6:15:08 am Build Build Joe 11/4/14 6:30:08 am Build Build

castle castle castle castle

Joe 11/4/14 6:39:08 am Build Joe 11/4/14 7:10:26 am Build Joe 11/4/14 7:20:39 am Build Joe 11/4/14 7:25:26 am Build Joe 11/4/14 7:50:39 am Build

castle castle castle castle castle

Build Build Build Build Build

Robert 11/4/14 8:00:00 am Build Robert 11/4/14 8:10:08 am Build Robert 11/4/14 8:15:00 am Build Robert 11/4/14 8:20:08 am Build

Build Build Build Build

castle castle castle castle

I need to find a way for excel to give me how many time gaps are greater than 10 minutes between 6am and 7am, and input that in one cell. Also, I need in another cell the total time of those 10 minute gaps for that same hour. I need these calculations only when a specified user is entered in cell A1. Can you help me with this? Thanks, Willie Reply 64

liam says: November 28, 2014 at 10:25 pm Hi im wanting text "IN" to equal 2 when typed in how do i use countif to add 2 toa total amount thanks Liam Reply

65

John says: November 29, 2014 at 11:37 am Hi, Please help I have data this Folder Pax TU1 2 TU1 3 TU2 1 TU2 5 TU3 6 TU3 1 And I want Folder Pax TU1 5 TU2 6 TU3 7 Reply

https://www.ablebits.com/office-addins-blog/2014/07/02/excel-countif-examples/#countif-syntax

32/56

6/29/2015

Excel COUNTIF examples – not blank, greater than, duplicate or unique Svetlana Cheusheva says: December 4, 2014 at 1:09 pm Hi John, The quickest and simplest way is creating a pivot table based on your data. Just drag the Folder column into the Rows area and the Pax column into the Value area, then select the data and copy it to the location you want. For more information about PivotTable, please see this article: https://www.ablebits.com/office-addins-blog/2014/11/19/excel-pivot-table-tutorial/ Reply

66

Mat says: December 5, 2014 at 4:47 am I am trying to do something much simpler. I would like to count the number of different items in a list and just by specifying the column as a range. Can this be done? Reply Mat says: December 5, 2014 at 4:57 am The closest I have got is =SUMPRODUCT(1/COUNTIF('Sheet1'!A1:A8000,'Sheet1'!A1:A8593)) Where there are 8000 lines in the spreadsheet. However if I put in 8001, I get a divide by zero error. It would also be preferable if I could ignore the top line as it is headings but I can jus -1 if needed Reply

67

Rachana says: December 5, 2014 at 5:21 pm Hi Svetlana, I have a main summary sheet where i want the count meeting below criteria in a cell. I have sheet1 and summary sheet. Sheet1 has Col F with all the names of the officer like Tina, Mira etc. Col I has months like March,April etc. And Col J has the target dates of visit after 6 weeks from the tenancy date. This col J also has the date in different year 2013, 2015,2016 so on, e.g. 01/05/2014, 31/03/2015 etc. Now from sheet1, a cell in summary sheet should check for the names from Col F e.g. Tina, then it should take count all the April Months from Col I against Tina's name, and should count only the dates that fall between 01/04/2014 till 31/03/2015 against Tina's name. 1) To select the names from F col from sheet1 2) to count months against a name from col I 3) to add a condition that the visit target date - 6 week which is in col J should fall from 01/04/2014 to 31/03/2015 against the selected name Please can you advise a formula for this. Thanks in advance, Rachana Ranpura Reply

68

Richard Phillips says: December 5, 2014 at 9:40 pm I have a Question and its probably easy for you to work out, but it's bugging my head out.. Ok, I have some Data and its in columns Based format running down one column each L, A, B, each l,a,b, if that makes sense running down the Spreadsheet is, the L value is Averaged out and each L ,A, b,value is posted to each other Cell averaged out. Each L,B,A Value is averaged out,OK. The value is posted to another Cell and the Cell calculates a Positive value, Greater Than Positive or a Negative, the worked out Value is posted to another cell. The then value is Dynamic, meaning its not the same based on Human input moving a threshold up or down. It reproduces a value thats not constant until a actual result is put into the formula Cell.. I want it to collect a value from a cell with a formula thats Dynamic.... I want to work out a Greater than and less on this Dynamic Cell. But its producing a Zero

https://www.ablebits.com/office-addins-blog/2014/07/02/excel-countif-examples/#countif-syntax

33/56

6/29/2015

Excel COUNTIF examples – not blank, greater than, duplicate or unique Result this Dynamic. If at all you need a video or screen representation then i will look at that option.. Reply

69

courtney says: December 8, 2014 at 10:07 am Hi Svetlana, I am trying to count the number of cells in a column which are all populated with text. I am trying to count the amount of cells in that column which contain less than 10 words? how do i do this? Many thanks, Courtney Reply

70

Wayne says: December 12, 2014 at 2:21 pm I have a worksheet that currently counts the number of rows in a worksheet that are populated in certain columns: =COUNTIFS(Andrew!E2:E998,"*",Andrew!F2:F998,"*",Andrew!H2:H998,"*",Andrew!J2:J998,"*" ) this method of conting is used to count for each tab in the workbook and is sumarised with the formula: =SUM(F20:N20) to produce an overall value. There are 5 of these sheets that are linked into a master sheet that counts the =SUM(F20:N20) from each book and produces a grand total. Is there a function that will allow me to produce a list of rows that satisfy the formula buy way of a report? Reply

71

ameya says: December 14, 2014 at 4:45 pm Hello Svetlana and everyone, I had a small question regarding data analysis. I tried looking COUNTIF and FREQUENCY. I want to quantify following things in my data set I want measure the number of events where 0 appeared 5 times or more, consecutively in a given data set. (e.g.: 000001100010000000 (here zero appeared consecutively, twice, 0=5 and 0=7)) Is there any formula to do this? Thanks in advance Cheers Ameya Reply

72

Sam says: December 18, 2014 at 11:07 am Hello, Thank you for this post that I must admit is very useful for people introducing Excel. I would like to know something, I'm trying to put out duplicates from a column but the thing is, by adding all the data I'd like the formula to count cells from number (scale number) 402 to 460 and so on for 502 to 560 etc. Here is a look on the formula : =SUM(IF(FREQUENCY(MATCH(A2:A749,A2:A749,0),MATCH(A2:A749,A2:A749,0))>0,1)) and then this is what i'd like to add inside the previous one : =COUNTIF(A2:A749,">=502")-COUNTIF(A2:A749,">560") A2:A749 datas are numbers ONLY To sum up, I want to count all the cells except duplicates and only from number 502 to 560 Thank you for your advice!

https://www.ablebits.com/office-addins-blog/2014/07/02/excel-countif-examples/#countif-syntax

34/56

6/29/2015

Excel COUNTIF examples – not blank, greater than, duplicate or unique Sam Reply

73

Corinna Griffin says: December 18, 2014 at 4:55 pm OMG! Thank you!!! This helped out so much! Reply

74

Frank Johnson says: December 19, 2014 at 5:18 pm Thank you so much for taking the time to share your knowledge! I was wondering, is there a way to calculate the % of numbers within a column that are greater than another value? I work in education, and I have very long lists of students names and their scores on any given assessment. I would like to, for example, calculate the percentage of students who scored greater than or equal to 42%. Is this possible? I can sort and do the calculations manually, but the larger my lists get, the more errors I have. Thank you!!! AB Bill 24% Chris 82% Ringo 19% Paul 96% John 94% George 88% Mick 16% Reply

75

Jane says: December 19, 2014 at 9:56 pm =COUNTIF(tblJanuary[@[1]:[31]],"V")+COUNTIF(tblJanuary[@[1]: [31]],"A")+COUNTIF(tblJanuary[@[1]:[31]],"S")+COUNTIF(tblJanuary[@[1]:[31]],"H") I want to count the number of certain values (V, A, S, and/or H) in row, but I do not want it to count any other values I might enter. I tried the above formula but it still counted if I enter something other than V, A, S, H. Any ideas? Reply Jane says: December 19, 2014 at 10:05 pm Nevermind - Actually, it is working! Happy Holidays! Reply

76

Chad says: December 23, 2014 at 3:35 am =AND(COUNTIF($A$1:$P$261,A1)>1,A1>0) Good day, I am trying to highlight all duplicate dates that match on a worksheet, the above formula is a conditional format that works, but it also highlights text values. I originally wanted to create a conditional format that referenced a column on another worksheet(called A), and then highlighted those dates that corresponded in a table on worksheet(called B). But I could not get it to ignore blank cells or cells with text in them. I tried many, many, times. I am probably too much of a novice in my understanding of how formulas work. Any help you can offer would be very much appreciated. Reply

77

varigonda gopi says: December 30, 2014 at 3:52 am hi Svetlana, how to count cells by identification of the cell color. Reply

https://www.ablebits.com/office-addins-blog/2014/07/02/excel-countif-examples/#countif-syntax

35/56

6/29/2015

Excel COUNTIF examples – not blank, greater than, duplicate or unique

78

Anonymous says: December 31, 2014 at 6:07 am Hi, below is my excel sheet , can we write a power query to find number of session( start to End) Expected result for below excel is 2 , if suppose A12 had End Session the count to be 3. A 1 Start session 2 ... 3 ... 4 ... 5 End Session 6 Start session 7 ... 8 ... 9 End Session 10 Start session 11 ... 12 13 I do have a huge data in working excel (taking lot of time using vba script ). please help to find a solution. Thanks in advance, Sunil Reply

79

Sunil M P says: December 31, 2014 at 6:09 am Hi, below is my excel sheet , can we write a power query to find number of session( start to End) Expected result for below excel is 2 , if suppose A12 had End Session the count to be 3. A 1 Start session 2 ... 3 ... 4 ... 5 End Session 6 Start session 7 ... 8 ... 9 End Session 10 Start session 11 ... 12 I do have a huge data in working excel (taking lot of time using vba script ). please help to find a solution. Thanks in advance, Sunil Reply

80

Sam says: January 5, 2015 at 3:15 am Hello, I am making a spreadsheet for a sales team. I have the formulas to count the deals they have. I have salesperson 1 (column I) and salesperson 2 (column j). My formula is ((countif(i5:i29,"mike")+(countif(j5:j29,"mike"). However, when there is a salesperson two, then both sales person 1 and salesperson 2 are Only allowed a "half deal" meaning it should Count .5 for both rather than full. Can you help? Thank you so much Reply

https://www.ablebits.com/office-addins-blog/2014/07/02/excel-countif-examples/#countif-syntax

36/56

6/29/2015

Excel COUNTIF examples – not blank, greater than, duplicate or unique

81

jo says: January 7, 2015 at 4:22 am i have got many sheets in my workbook.but the problem is that i have to create pivot tables of only those sheets which end with Total??? Please help please ---Thanks in advance Reply

82

Hoda Ghalayini says: January 15, 2015 at 2:52 pm I want to know how to use the COUNTIF Formula if we want to count number of customers whose second letter of their names is as "A" Reply Svetlana Cheusheva says: January 19, 2015 at 11:17 am Hi Hoda, Try =COUNTIF(A2:A100,"?A*") where A2:A100 is the names column. Reply

83

Sujatha Victor says: January 18, 2015 at 11:32 am Very useful for analyzing the marks scored by the students. I want a formula (countif function) for finding the marks scored by the students from 1 to 4 (like that 5 to 17; 18 to 24; 25 to29; 30 to34; 35 to 44;45 to 49). Range is marks scored by students for 50 marks. I kindly request you to please intimate the criteria for which I will be ever grateful. Regards, Sujatha Victor Reply

84

Rachana says: January 26, 2015 at 11:36 am Hi Svetlana, Very happy new year to you!! Please can you help me on below query. I have a table to calculate balance leaves each time number of leaves taken are entered it would deduct from the available no of leaves for the period. Now i am trying to apply the formula =SUM($K$8-G12) to the whole column M. Now i want to add a condition that if the Col G is blank, then M should also have blank value otherwise it would count as per formula =SUM($K$8-G12) which is Total no of leaves - leaves taken = balance leaves. Thanks, Rachana Reply

85

Lissa says: January 26, 2015 at 5:32 pm I'm trying to count the output of an IF function. It seems that the COUNTIF function can't read the output of the IF function as data, but only the function behind the output. Is this true? Can I use COUNTIF to count output form an IF formula? Thanks, Lissa Reply

86

Pauline says: January 30, 2015 at 11:12 am Hi i need to count the sum of the failed but the problem in it i that one column there are two different data i mean on the same day thanks Reply

https://www.ablebits.com/office-addins-blog/2014/07/02/excel-countif-examples/#countif-syntax

37/56

6/29/2015

Excel COUNTIF examples – not blank, greater than, duplicate or unique

87

Ulvi says: February 3, 2015 at 7:38 am Hello, I want formula like this: for ex : if row 4 have value in anywhere will find and then take text or value from upper row's - example formula found f4 value then will take f3 text or value... Thanks Reply

88

fiza says: February 4, 2015 at 12:08 pm Hi, i want to use countifs function , to assign rank to the people FOr exp. Column A: List Emp Name Colum B: contains Numeric figures achieved by them Column C: in this i want Rank( high to low), means the employee got the highest number in the list, should be ranked as "1", as he is the topper. Can i use it for this ? Reply

89

ChrisB says: February 4, 2015 at 11:51 pm On a yearly spreadsheet, I have numerous entries with dates throughout the year. If I want a count of how many entries there are for a given month, January, February, etc., how would I do that? Also, the entries are on one worksheet and the count will be on a different worksheet (in the same workbook), how would that formula be written? For example: 1/10/15 1/18/15 2/17/15 3/4/15 Count=2 (for January) Reply

90

king9x says: February 12, 2015 at 1:36 am I'm trying to count non duplicate using =SUMPRODUCT((COUNTIF(L13:L567,L13:L567)=1)*(L13:L567"")) but when I filter other column to unique name, the total remaining the same. How it will be possible by using same formula? Thanks. Reply Alexander says: February 13, 2015 at 6:05 pm Unfortunately, COUNTIF processes hidden (filtered) cells as well. Please have a look at the following article how to process only visible cells: http://www.exceluser.com/formulas/visible-column-in-excel-tables.htm Reply

91

Jp says: February 14, 2015 at 2:45 am Need some help here I have analyzed 10 Columns of 190 numbers and have counted 321 matches I want to take the 321 numbers scattered throughout the various columns and put them in another column in order of how they appeared. Any idea how I could lookup, find and get the data into a new column? The thing is as new data goes in the numbers of matches can vary between 1 and 1900 Thanks Reply

https://www.ablebits.com/office-addins-blog/2014/07/02/excel-countif-examples/#countif-syntax

38/56

6/29/2015

Excel COUNTIF examples – not blank, greater than, duplicate or unique

92

GR says: February 17, 2015 at 1:32 pm Hi I want to be able to do a COUNTIF across 2 spread sheets but for 1 cell in both sheets, so D2 in one spread sheet will be the same as D2 in the other. However, I want to use the count if option to do this. So if D2 was blank in one sheet, it would be blank in the second sheet, but if D2=2 in the first sheet then it would be 2 in the second. Currently the first sheet will be blank but the second sheet will be 0 as it is linked to the first sheet. But we need this to be blank. Hope this makes sense, thank you. Reply

93

Dee says: February 17, 2015 at 10:03 pm Hi - hoping you can help. I need to count column B (which are various ID numbers), remove the duplicates but only count them if Column A says "BIP" and Column F says "Active" Is it posible to do this in one formula?? Thanks heaps Reply

94

Hailey says: February 19, 2015 at 5:48 pm Hello! Im trying to count blank cells in a column in my spreadsheet, but it wants to count the whole sheet and not just the ones included in my table. How can i do it so it only counts blanks that are part of my table (they have other information in their rows). Any suggestions on how to do this? Thank you! Hailey Reply

95

Donna says: February 24, 2015 at 7:13 pm Hi Svetlana, Thank you for your informative post and support! I dates in 2 columns: one column (M) for "original planned date of project completion", and another column (N) with "latest planned date of project completion". I want to count the projects that have a latest date later than the original planned date, i.e. "count if the date in column M is greater than the date in column N" specifically trying this formula COUNTIF(M3:M22,">L3:L22"). It is not calculating correctly - any ideas? Thanks again!!! Reply Svetlana Cheusheva says: March 10, 2015 at 3:19 pm Hi Donna, The COUNTIF formula cannot help in this case because you need to compare 2 ranges. Try the following array formula (remember to press Ctrl+Shift+Enter) to enter it correctly: =SUM((M3:M22>L3:L22)*1) Reply

96

Twister says: February 27, 2015 at 2:36 pm Hi I am trying to count the number of clients within ranges. example: all clients who are >= 10 but =10")and=COUNTIF(H3:H1659,"20") Reply

https://www.ablebits.com/office-addins-blog/2014/07/02/excel-countif-examples/#countif-syntax

39/56

6/29/2015

Excel COUNTIF examples – not blank, greater than, duplicate or unique Svetlana Cheusheva says: March 10, 2015 at 3:09 pm Hi Twister, I am not sure I exactly understand your criteria. Anyway, you can use the COUNTIFS function to count cells based on several criteria. You can find the detailed exhalation of its syntax and formula examples on this page: https://www.ablebits.com/office-addins-blog/2014/07/10/excel-countifs-multiple-criteria/ Reply

97

KusumP says: March 1, 2015 at 4:31 pm Hi there I am trying to find out a way to count the dates in multiple cell range : in My excel sheet 30-Sep-14 30-Dec-14 30-Jul-14 30-Jul-14 30-Jul-14 30-Jul-14 30-Sep-14 30-Aug-14 30-Aug-14 30-Dec-14 30-Dec-14 30-Dec-14 7-Oct-1 30-Sep-14 30-Dec-14 30-Dec-14 30-Jul-14 30-Dec-14 7-Oct-14 there are dates in column range O3:O46,L3:L47,R3:R51,U3:U51,X3:X50 i am trying to get the count of date which fall in within particular months i.e. April 14, May 14,June 14.July 14.August 14,September 14..... i am using this formula but not getting any result, thanks in advance for any help. =COUNTIFS(O3:O46,L3:L47,R3:R51,U3:U51,X3:X50,">=1/1/2013", O3:O46,L3:L47,R3:R51,U3:U51,X3:X50,"0")) i am using this in name manager to automatically update a control chart as i dump data in my "Raw Data" tab. the chart is a representation of a shipments date (x axis) and the analysis of the shipment on that date. the issue that i am having is that the formula is not counting the entire column. Furthermore my chart is still picking up the zeros there is a large amount of entries in the column (J5-J65 the formula above stops at J26. i can not figure out why. Reply John Vaught says: March 12, 2015 at 2:55 pm Im sorry in the range above i mean K5-K65 and stops a K26 Reply

https://www.ablebits.com/office-addins-blog/2014/07/02/excel-countif-examples/#countif-syntax

41/56

6/29/2015

Excel COUNTIF examples – not blank, greater than, duplicate or unique

103

Zenher says: March 16, 2015 at 3:40 am Hi there, Good day to you, i have a XLS with 2 Tab Aging and score card. I have different value for column "W" in aging tab and i would like calculate the below. 1. to calculate the total for all the different texts which are not "abc" and with a specific aging day. ** Please Help** 2. to calculate the total "abc" and with a specific aging day, which i mange to do it. =COUNTIFS(Aging!$W:$W,"abc",Aging!$B:$B,ScoreCard!J18,Aging!$N:$N,""&(TODAY()-30) >> THIS IS WHAT I NEED TO CHANGE. I need to change instead of being last 30 days, to be for the CURRENT month only. So today being in May, I want it to count how many times "John Doe" has had the Attendance code of "CIO - CI OUT" for THIS MONTH. It should reset next month to only include June automatically. Reply

129

Debbie says: May 12, 2015 at 2:47 am

https://www.ablebits.com/office-addins-blog/2014/07/02/excel-countif-examples/#countif-syntax

50/56

6/29/2015

Excel COUNTIF examples – not blank, greater than, duplicate or unique Hi Svetlana, I am using COUNTIF to give me a count of results that are in a range. I want to know how many fall between 8,000 to 9,000, 9,000 to 10,000, and so on. My range of data to look at is A1-A164 but within that range are many subcategories with totals for that category. My COUNTIF counts the total in the results but I don't want the totals counted. Other than making 50 separate ranges is there any other way you can think of to exclude the total cells from being included in the count? Thank you for any help you can offer. Reply Svetlana Cheusheva says: May 12, 2015 at 10:57 am Hi Debbie, I am afraid I cannot figure out any way other than you suggested :( Reply

130

Henry says: May 18, 2015 at 4:27 pm I have summation formulas in column Z and 2 cells with a value > 0 When I use the COUNTIF(Z5:Z108,">0" ) it correctly answers 2 How can I combine that with the question "How many are SHOWN that have a value > 0 somewhat like =Subtotal(109,Z5:Z108) Unsuccessfully tried SUBTOTAL(109,COUNTIF(Z5:Z108,">0")) and COUNTIF(SUBTOTAL(109,Z5:Z108),">0") Reply

131

Johan Bolle says: May 20, 2015 at 6:08 pm Svetlana, I'm trying to make a formula that does not count any cell that is Blank or 0. What am I missing here? "=-COUNTIF(B5:F5,B6:F6,"4
View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF