HOME
PRODUCTS
DOWNLOADS
SUPPORT
FORUMS
BLOG
ABOUT US
PURCHASE
Jul
223 Comments
2
Microsoft Excel provides several functions purposed for counting different kinds of cells, such
as blanks or nonblanks, with number, date or text values, containing specific words or
character, etc.
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.
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
For example, you can write a COUNTIF formula to find out how many cells in your worksheet
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).
COUNTIF(range, criteria)
Outlook
As you see, there are only 2 arguments, both of which are required:
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,
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 addins
Excel consolidation
Excel duplicates
Excel formatting
Excel fun
Excel functions
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
1/56
6/29/2015
Excel randoms
Excel tips
Excel Vlookup
Microsoft Word
new release
Office fun
Office news
Office tips
Outlook
Outlook addins
Outlook BCC
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
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
2/56
6/29/2015
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.
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.
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
3/56
6/29/2015
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 nonblanks: =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 nonempty cells in Excel.
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
4/56
6/29/2015
Criteria
Formula Example
Description
=COUNTIF(A2:A10,">5")
=COUNTIF(A2:A10,"<5")
Count if equal to
=COUNTIF(A2:A10,"=5")
=COUNTIF(A2:A10,"
<>5")
5.
=COUNTIF(C2:C8,">=5")
or equal to 5.
=COUNTIF(C2:C8,"<=5")
You can also use all of the above formulas to count cells based on another cell value, you will
just need to replace the number in the criteria with a cell reference.
Note. In case of a cell reference, you have to enclose the operator in quotes and add an
ampersand (&) before the cell reference. For example, to count cells in the range D2:D9 with
values greater than a value in cell D3, you use this formula =COUNTIF(D2:D9,">"&D3):
If you want to count cells that contain an actual operator as part of the cell's contents, i.e. the
characters ">", "<" or "=", then use a wildcard character with the operator in the criteria. Such
criteria will be treated as a text string rather than a numeric expression. For example, the
formula =COUNTIF(D2:D9,"*>5*")will count all cells in the range D2:D9 with contents like this
"Delivery >5 days" or ">5 available".
Formula Example
Description
=COUNTIF(B2:B10,"6/1/2014")
=COUNTIF(B2:B10,">=6/1/2014")
=COUNTIF(B2:B10,">="&B2"7")
Apart from these common usages, you can utilize the COUNTIF function in conjunction with
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
5/56
6/29/2015
specific Excel Date and Time functions such as TODAY() to count cells based on the current
date.
Criteria
Formula Example
=COUNTIF(A2:A10,TODAY())
=COUNTIF(A2:A10,"<"&TODAY())
=COUNTIF(A2:A10,">"&TODAY())
=COUNTIF(A2:A10,"="&TODAY()+7)
Here is an example of using such formulas on real data (at the moment of writing today was
25Jun2014):
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
6/56
6/29/2015
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.
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
7/56
6/29/2015
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<>""))
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
8/56
6/29/2015
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)
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
9/56
6/29/2015
Be very careful with using spaces in a COUNTIF formula. When creating one of the formulas for
this article I was on the verge of pulling my hair out because the correct formula (I knew with
certainty it was right!) wouldn't work. As it turned out, the problem was in a measly space
somewhere in between, argh... For instance, look at this formula =COUNTIF(B2:B13,"
Lemonade"). At first sight, there is nothing wrong about it, except for an extra space after the
opening quotation mark. Microsoft Excel will swallow the formula just fine without an error
message, warning or any other indication, assuming you really want to count cells containing
the word 'Lemonade' and a leading space.
If you use the COUNTIF function with multiple criteria, split the formula into several pieces and
verify each function individually.
And this is all for today. In the next article, we will explore several ways to count cells in Excel
with multiple conditions. Hope to see you next week and thanks for reading!
Follow
1.5k
Karo says:
July 22, 2014 at 4:44 pm
I want to group or count values that start the same. In this short example YTOP.125 should
be grouped together  or counted. I can work with either. So I want to be able to say "if the
first, for example 8 characters are the same then...
For example
ColumnA
YTOP.125SP
HYEP.556M
YTOP.648
MNTK.593
HYEP.257
YTOP.125LO
Can you help? Is this possible?
Reply
Svetlana Cheusheva says:
July 23, 2014 at 12:26 pm
Hi Karo,
Yes, it is possible, but you will need to add a helper column to your table. If this is
acceptable, then create an additional column and copy the following formula across that
column, which will extract the first 8 characters =LEFT(A2,8). After that, you can proceed
in 2 ways.
Way 1 using Subtotal:
 Sort your table by Column A or the newly created column with the above formula.
 Apply subtotal to the table (Data >Outline >Subtotal) with these settings:
At each change in : Column with the formula
Use function: Count
Add subtotal to: Column with the formula
 Click Ok.
 Then Press Number 2 at the left side of you sheet and you will get the count of codes
by the first 8 characters.
For more info about using subtotals please see this article  Using Subtotals in Microsoft
Excel
Way 2 using a pivot table:
 Insert a pivot table (select your table and go to Insert > 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/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
10/56
6/29/2015
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
KellyAnn 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 KellyAnn,
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
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/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
11/56
6/29/2015
Ruth says:
August 5, 2014 at 6:42 pm
Hi,
I need to combine an IF statement with a COUNTIF that will count 3 out of 5 text entry
options for a single column. If the COUNTIF =0, it needs to show as a dash. This is the
original formula that is working =IF(COUNTIF(B1:B10000,C1&D1)=0,"",COUNTIF(B1:B10000,C1&D1))
I need to add another criteria to the COUNTIFs, where there are 5 possible entries in
column E and I need it to count 3 of these (Allocated, Declined, Rejected). Any suggestions
is gratefully appreciated.
Ruth
Reply
Svetlana Cheusheva says:
August 6, 2014 at 1:05 pm
Hello Ruth,
Let me check if I understand the task correctly. Do you want to count values in column B
only if column E has any of these values: Allocated, Declined, Rejected? Or, are you
looking for something different? It will be very helpful if you can paste the values from a
couple of rows in columns BE and the result you expect a formula to return.
Reply
Robert says:
August 12, 2014 at 12:41 pm
I'm after something similar to what you were asking Ruth please.
I've set up the formula to count up all the instances of "*banananas*" in column B.
I then have a list of places in column A. So say the total amount of banananas is 300 I want
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
12/56
6/29/2015
lara says:
August 13, 2014 at 8:03 am
Hi
Im also after something similar to Robert.
In column A i have a number of different status ie. "On Programme", "Rejected",
"Completed" etc. and in column B i have a number of programmes ie. "Cleaning",
"Customer Service", etc and i want to could how many for example On programme
cleaning there are?
Ive tried and other formulas similar to this but none seem to be counting what i want.
=SUM((COUNTIF(A2:A32,"On Programme"))*OR((COUNTIF(B2:B32,"CLEANING"))))
Can you help?
Reply
Svetlana Cheusheva says:
August 14, 2014 at 7:08 am
Hello Lara,
The same as Robert, you should also use the COUNTIFS function rather than COUNTIF,
because COUNTIFS can count cells based on multiple criteria. The formula is as follows:
=COUNTIFS($A2:$A32,"On programme",$B2:$B32,"CLEANING")
You can find the full details in this tutorial:
http://www.ablebits.com/officeaddinsblog/2014/07/10/excelcountifsmultiplecriteria/
If you want to use the SUM function, you should enter the following array formula
(remember to press Ctrl + Shift + Enter to complete it):
{=SUM(($A2:$A22="On Programme")*($B2:$B32="CLEANING"))}
Reply
V Sorensen says:
August 18, 2014 at 2:18 pm
HELP! I'm trying to create a list of email addresses, based on wireless carrier. So if one
column has their wireless number, next column has carrier, I then want to combine
wireless number with the appropriate text email. Where these are the extensions I want to
add:
Verizon = @vtext.com
AT&T = number@txt.att.net
Sprint = number@pm.sprint.com
Tmobile = number@tmomail.net
So if someone lists
5556667777 Verizon
6667778888 Sprint
How do I create a cell that says If A6=Verizon, then 5556667777@vtext.com??
It's a list of a few hundred, so I'd rather no do manually. Thanks so much for the
assistance!
Reply
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
13/56
6/29/2015
10
11
Rod says:
August 20, 2014 at 9:43 pm
Hi Svetlana!, I hope you can help me...
I am making a sampletest exam where the correct answer will be hidden in column C and
column B will be where the person who is taking the exam will place his/her answer. I
need a formula to tell me how many correct answers were given. For example:
X1 = test takers' answer
X2 = correct answer
X1 X2AB
CC
AD
DD
BB
I need a formula that will tell me that the test taker answered 3 questions correctly and
then divide that value by the number of questions, in this case 5 questions. FYI: The
answers will be sidebyside, however many blank rows will separate each answer (to
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
14/56
6/29/2015
12
Samantha says:
August 21, 2014 at 5:42 pm
I tried using the countif(range,""&"") to count the cells within a range in my sheet that
have something written in them and it keeps counting all of the cells selected.
If I tried counting all the cells that are blank instead and write countif(range,""&"*") it
brings me to 0.
Any idea of why it wont count my cells that have data?
Reply
Svetlana Cheusheva says:
August 22, 2014 at 12:47 pm
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
15/56
6/29/2015
13
Lance says:
August 26, 2014 at 6:09 pm
Trying to calculate the number of times certain words appear in a column. Some of the
cells works others don't and I am using the exact same formulas for both. Even when I
click in on the fx button the total is correct in the formula, but it won't replicate it to the
cell. The cell just shows the formula an not the number. I have all the cells formatted to
general, even the ones that are working correctly.
Reply
Svetlana Cheusheva says:
August 27, 2014 at 10:22 am
Hello Lance,
It's hard to pin down the cause of the problem without seeing your data. If you can send
you sample workbook at support@ablebits.com, we'll try to figure it out.
Reply
14
Bilal says:
August 27, 2014 at 2:24 am
Is there any site where we can get online support for MS office (Excel) I mean through
chat...
Reply
Svetlana Cheusheva says:
August 27, 2014 at 10:18 am
Hi Bilal,
I am sorry, I do not know any website that provides free online consultancy / support for
Microsoft Office.
Reply
15
Gayle says:
August 29, 2014 at 1:19 pm
I need to count the number of names in a column, but exclude any that have been struck
through.
Reply
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
16/56
6/29/2015
16
Shams says:
September 4, 2014 at 11:09 am
Greetings
Making an attendance sheet
Want 5 T=Tardies to couny as a 1
Ex. 28 periods a week one has 12 Tardies which means 2 absents so 112 periods a month
in average so how or which formula can help me count 5 T=Tardies as 1
Thanks in advance
Reply
17
Sam says:
September 4, 2014 at 3:42 pm
Not sure if its possible, but can you Count the Blank spaces in One Column (say Column A)
if there is specific text in Column B that corresponds to the blank area. For example, I need
to know how many have responded to my invitation (blanks)in column A, but have
informed me they are available (Word: Available)in column B. I have tried to combine a
=CountBlank with a =COUNTIF but it doesn't seem to be working for me.
Thank you!
Reply
18
Alex says:
September 9, 2014 at 8:19 am
Hi
I want to be able:
If column A = certain text, then I want all the Values in Column B(same row) be summed
together:
For example:
Profession Mark
Nurse 5
Doctor 2
Careworker 2
Doctor 6
Doctor 7
Nurse 8
Nurse 5
Nurse Doctor Careworker
(sum) (sum) (sum)
Reply
19
Alex says:
September 9, 2014 at 8:52 am
Hi
Never mind, I figured it out.
thank you
Reply
20
Tommy says:
September 10, 2014 at 10:16 am
Hello,
I want to count the number of blank cells from a specific character.
The problem is that the range is extended with one cell, each day. Can you automatically
extend that range each day?
Also, eventially the specific character will appear again in later cells, then I want it to start
the count of blank cell from this "new" specific character.
Example:
The letter P is in cell B2 the range is B2:G2, hence 5 blank cells. Two days after I want the
range to be B2:I2 i.e. 7 blank cells.
Another three days later the the letter P appears in cell K2 (range is now B2:L2), hence it
should start the count from K2 i.e. 1 blank cell.
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
17/56
6/29/2015
21
Heather says:
September 10, 2014 at 1:13 pm
I am trying to identify and account for duplicates. I would like the COUNTIF formula to tell
me if there is a duplicate anywhere else in that column. If a unique value it would result in
a "1" and if a duplicate is found it will result in a "0." However, I would also like the 1st
occurance of a value to result in a "1" and all other duplicate values to be a "0." How can I
get that 1st occurance of a value to result in a "1" separate from its duplicates?
Reply
Ange says:
February 4, 2015 at 10:47 pm
=IF((COUNTIF($A$1:$A1))=1,1,0)
Reply
22
Pina L C says:
September 16, 2014 at 12:08 pm
This is so useful Svetlana, and your answers to the questions here helped a lot today at
work. Thanks!
Reply
23
Carol says:
September 17, 2014 at 5:01 am
Hi. i have 6 sheet tabs. The 5 sheet tabs are the summary report of 5 different branches
and the other sheet tab is for my summary report. All column A of 5 sheet tabs refers to
different sports while column B refers to number of votes for different sports. I need to
get the top 3 sports for all branches.
For example,
In Branch 1, the top 3 sports listed are basketball, football and volleyball with 85, 74 and
65 votes. For branch 2, the top 3 listed are tennis, basketball and badminton with 65, 54
and 32 votes and so on. How will i get the top most sports from 5 different branches that
will also add the votes if for example all branches have basketball in their list? Hope you
can help me with this.
Thank you
Reply
24
25
Al+Imran+Monju says:
September 18, 2014 at 4:49 am
Hi,
I want to know from you that how can I count the two cell data at a time like:
ColA Col B
1M
2F
3F
6M
2F
3M
I want to know for 1 how many M of F and for 2 how many M or F Like 
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
18/56
6/29/2015
26
Karla says:
September 24, 2014 at 8:12 pm
Can you please tell me what the formula is if I want when if a # is less than 35 then add
$5.75 if it's greater than 35 add $12.75 please help thanks
Reply
Svetlana Cheusheva says:
September 25, 2014 at 6:18 am
Hi Karla,
I am not sure I can exactly follow you. Do you want to enter a number in some cell based
on a value in another cell? For example, if a number in cell A1 is less than 35, than put
5.75 in cell B2, if it's greater than 35, than put 12.75? And what if it is equal to 35?
Reply
27
Rick says:
September 26, 2014 at 4:29 pm
Does the COUNTIF function only compare the first 15 characters? I use it to check for
duplicate values. It flags 2 of my cells as being duplicates. The only difference is the 16th
character.
Reply
Rick says:
September 26, 2014 at 5:45 pm
I tested this theory of mine using the right 15 characters of a concatinated string. That
fixed the problem.
Reply
Svetlana Cheusheva says:
September 29, 2014 at 4:52 pm
Hello Rick,
Thank you for the information and the update.
To my best knowledge, the COUNTIF function has 255 characters limitation since Excel
2007. And one can bypass this limitation by using the Exact function in array
formulas.
The issue you describe may occur either in a very old version of Excel, or more likely, if
your sheet contains only numeric data and Excel treats it as numbers. As you
probably know, Excel has a 15 digit limitation when it comes to numbers, and after the
first 15 digits, it replaces everything with 0's. Please check out the following Microsoft
answer for more details:
http://answers.microsoft.com/enus/office/forum/office_2007excel/15digitnumberlimitationnontextworkaround/a49748537c3c483085622e88369d981b
Reply
28
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
19/56
6/29/2015
29
30
Vamsi says:
October 5, 2014 at 6:09 pm
HELLO,
Please help me in this problem
Formula: =IFERROR(LOOKUP(C2,Sheet1!$A$30:$A$39,Sheet1!$B$30:$B$39), "")
Required condition: If C2 cell in not equal to A2 " additional conditon to be added in above
formula with the existing.
Reply
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
20/56
6/29/2015
31
Vamsi says:
October 6, 2014 at 5:34 pm
Hello,
DESCRIPTION OF FORMULA MADE IN EXCEL WORKSHEET.
C2 WILL BE ENTERED BY USER.
In D2 the entered value of user will be searched (LOOKUP)in other worksheet with in
specified range of column (Sheet1!$A$30:$A$39) and output will be the specified range in
other column (Sheet1!$B$30:$B$39).
If there no entry in the cell (C2) by user the cell (D2) will remain Blank.
Here my requirement:
In addition to above condition the value entered in C2 should not be equal to Value of A2,
if equal then it should be an error message (N/A).
PARAMETERS OF THE CELLS in worksheet 2:
A2 DUTY CODE NORMAL
C2 DUTY CODE OVERTIME
D2 TIMING OF DUTY
Sheet1!$A$30:$A$39  Worksheet 1 A30 to A39 are duty codes
Sheet1!$B$30:$B$39  Worksheet 1 Duty timing
ENDReply
Svetlana Cheusheva says:
October 8, 2014 at 4:30 pm
Hello Vamsi,
If you can send us your sample workbook at support@ablebits.com and we'll try to find
a solution.
Reply
32
Rachana says:
October 8, 2014 at 2:20 pm
Hi Svetlana,
What formula can i use if i want a value "N" in 1st coulmn based on blank cells that
appear in 2nd column and want value "Y" in 1st column based on nonblank cells that
appear in 2nd column. Please advise.
Y/N Names
N
Y abc
Thanks
Reply
Svetlana Cheusheva says:
October 10, 2014 at 12:09 pm
Hello Rachana,
You can use the following formula for your 1st column:
=if(B2<>"", "Y","N)
Where B is your second column.
Reply
Rachana says:
October 15, 2014 at 11:15 am
Thank you Swetlana!!!
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
21/56
6/29/2015
33
Amber says:
October 8, 2014 at 4:11 pm
Hi Svetlana,
I have three columns that are populated via a pivot table (in tabular format). They are site
(a), manager (b) and rep (c). Only one cell populates per row across the three columns. I'm
trying to build 1 formula that can be applied to all rows in one column (d), that counts the
# of items entered in a given month for either site, manager or rep...depending on which
column (ac) is populated in that row.
I recently built the below formula that looks at the rep column first. If it is populated, it
counts the # of times that reps name shows up in column b on the data tab. If it is blank,
then it knows it needs to refer to column b for the manager name and then count the #
times that managers name shows up on the data tab in column f.
=IF(C6="",COUNTIF(DATA!$F$3:$F$3000,B6),COUNTIF(DATA!$B$3:$B$3000,C6))
I need help adding an additional (nested if or and) function that says if both column b and
c are blank, refer to column a and then search the # of times that site shows up in column
d of the data tab. Let me know if I am not explaining this well enough. I appreciate your
help in advance!
Thanks!
Reply
Svetlana Cheusheva says:
October 10, 2014 at 12:06 pm
Hi Amber,
I think we will be able to help you better if we can have a look at your data. I possible,
please send your sample workbook at support@ablebits.com.
Reply
34
Vamsi says:
October 9, 2014 at 7:15 pm
Hellow Svetlana Cheusheva, Forwarded the workbook file by mail for your guidance and
support. Hope you can help me.
Thanks
Reply
35
COUTNING says:
October 11, 2014 at 11:26 am
I need a formula that says:
if column I = cell A1 count it, but if column I is blank then go to column g only count it if
column g = cell A1
Reply
36
Satheesh says:
October 14, 2014 at 4:10 am
If a sheet arranged as bellow
Col A col B col C
Name rank age
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
22/56
6/29/2015
37
Rachana says:
October 15, 2014 at 11:17 am
One more help i would need on a formula.
I have one column "A" with names e.g. Mike, Tony etc goes till A12, and the names are
repeated.
other column "B" having some numbers with % sign e.g. 90%, 80% etc.. goes till B12
Now i want to count non blanks ones in B1:B12 for Mike in B1:B12
I tried as below , but it didnt work. Please can you advise which formula fits better..
=countifs('Block Inspections'!B1:B12,'Block Inspections'!A12:A150,"=Mike")
Thanks,
Rachana
Reply
38
Rachana says:
October 15, 2014 at 11:18 am
Hi Swetlana,
Just to add on above query, i am counting them on another master sheet.
Thanks,
Rachana R
Reply
39
Rachana says:
October 15, 2014 at 11:35 am
Hey Swetlana,
I just tried as below as it worked :)
=COUNTIFS('Block Inspections'!$A$12:$A$150,"Mike",'Block Inspections'!$D$12:$D$150,"")
Thanks,
Rachana
Reply
40
Rachana says:
October 15, 2014 at 11:36 am
Oops i tried as below with the non blank ones and it worked. :)
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
23/56
6/29/2015
41
Jeremy says:
October 25, 2014 at 7:54 pm
Hi i am trying to come up with a formula that I can find the duplicate order ID in one
column and have it subtract the dates in another column so I can figure out how long it
took to ship.
Reply
Svetlana Cheusheva says:
October 28, 2014 at 11:20 am
Hello Jeremy,
I am sorry, your task is not very clear. If you can send your sample to our support team
at support@ablebits.com, we'll try to help.
Reply
42
Rachana says:
October 26, 2014 at 3:09 pm
Hey Swetlana,
Please can you advise on below 2 quesries.
1) I have A column that shows a start date e.g. 1012014 and the task needs to be
completed by 6 weeks. So i want the B column to auto calculate the date of completion
that is 6 weeks from the start date. Please can you advise how can formulate this one. And
like also want to calculate for other target dates i.e. after 26 weeks in another column and
52 weeks in another column.
Col A(start date) Col B(6 weeks target date)
1012014 ? (How to auto populate date)
1) Now I have two columns as below, please can you advise.
Column B shows  target date to be completed and the column C is showing actual date
for the task completed. Now i have column D where i want value Y or N based on date of
completion is greater or lesser than the target date. So if completion date is greater than
target date than it should show N on Column D and similarly Y where the date is equal or
lesser than the target date. Please can you advise how can set a formula for this one.
Col A Col B Col C Col D
start date 6 weeks target date Actual date Y or N ?(auto populate)
01092014 ? Auto populate 20/10/2014 N  Value to auto populate
Thanks,
Rachana
Reply
Svetlana Cheusheva says:
October 28, 2014 at 11:19 am
Hello Rachana,
Here's the formula for column B (cell B2): =A2 + 6*7
And this one is for column D: =IF(C2<=B2, "Y", "N")
Reply
Rachana says:
October 30, 2014 at 5:15 pm
Thank you Svetlana :) It worked
Now when i use =IF(C2<=B2, "Y", "N") and along with that i want to add one more
criteria that if the completion date column is blank then the Y/N column should
remain blank. Please can you advise.
Thanks,
Rachana
Reply
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
24/56
6/29/2015
43
44
Ashish says:
October 28, 2014 at 4:41 pm
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
25/56
6/29/2015
45
Ashish says:
October 30, 2014 at 10:39 am
thanks Svetlana,it worked and saved my almost 10 mins from daily my work :).
Reply
46
handri says:
October 30, 2014 at 4:11 pm
please help me Svetlana. I have a problem about sequence of numbers that is a lot to be
able to read just one in a column. eg: column A there are numbers
9,1,2,3,4,2,2,5,6,2,7,5,4,8,9,2,10, then I would like to read into 1,2,3,4,5,6,7 , 8,9,10. how the
formula? thank you very much
Reply
Svetlana Cheusheva says:
November 5, 2014 at 2:01 pm
Hello Handri,
I am sorry, it is not very clear what you want to get. If you can send the source data and
the expected result to support@ablebits.com, our support team will try to help.
Reply
47
Zack says:
October 31, 2014 at 9:10 pm
I am trying to use the count unique values function as part of a COUNTIFS equation, I need
to count the amount of 'P's in one column, that have a unique number in another column.
I can't get the unique equation to work though. Please help.
=COUNTIFS(E$7:R$42,">0",F$7:S$42,"P",E$7:R$42,"=1") Where did I go wrong?
Reply
Svetlana Cheusheva says:
November 5, 2014 at 1:35 pm
Hello Zack,
You need a helper column that will show whether the number in another column is
unique or not.
The formula can be as follows:
=if(countif(D:D,D2)=1,1,0)
Then you can use a value from this helper column as one of the conditions for your
COUNTIFS.
As I can see in your formula, several columns are used for each range. Is this correct?
Reply
Zack says:
November 6, 2014 at 5:45 pm
Yes that is correct, the way that we have the page formatted is largely for viewing
ease.
Reply
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
26/56
6/29/2015
48
Khalid says:
November 3, 2014 at 8:45 am
Hi Svetlana,
I have data in Col that A.
I want to know no of lines between each pipe ()
Expected Result in B col for
first pipe is 0
Second Pipe is 6
Third Pipe is 7
Data

1
ZGF1213420
S ILIYAAZ
S AZEES MIAH
345322
29

2
ZGF0316174
U SUMALATA
NARASHIMHA
MURTHI
53/1
21

Thanks in Advance,
Khalid
Reply
49
Rachana says:
November 5, 2014 at 5:09 pm
Hi Svetlana,
Lets say an A column has Start date that is blank and i want to add a formula on C stating
that if A1 is blank then C1 should be blank but A1 has a start date then it should calculate
A1+6*7 for the date to auto populate on the 6 weeks date. Please can you advise.
From your previous reply i see we can use =IF(A1="","") for having blank cell but not sure
how to further add the criteria as above. Please advise me.
Thanks in advance
Rachana
Reply
50
Rachana says:
November 6, 2014 at 5:31 pm
Hi Svetlana,
I am using formula =IF(K5>=$A$1, "True", "False") where A1 is 01/04/2014. Now I want to
add additional criteria to it as below, please can you advise.
I have A1= 01/01/2014 and B1=31/03/2014
I want C1 to calculate if D1 cell has the date that is >= A1 and <=B1 then put value True
otherwise false.
Thanks in advance
Rachana
Reply
Svetlana Cheusheva says:
November 7, 2014 at 7:40 am
Rachana,
You don't need the COUNTIF function for this task. Just add one more IF statement to
your formula:
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
27/56
6/29/2015
51
Farhana says:
November 9, 2014 at 4:46 am
Hi
I have Excel File with more than 1000 columns and rows and in some rows/columns, there
are email addresses. I want to collect all emails only in one column. Can you please guide
Reply
52
53
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
28/56
6/29/2015
54
the cell
the cell
the sell
the cell
containing either N or M
with "New Birth" etc.
with the "start date", e.g. 1/4/14
with the "end date", e.g. 30/6/14
Naturally, you can put the above conditions directly into the formula, but in this case you
will have to rewrite it for each set of conditions.
You can also use the above formula in another worksheet, by adding the worksheet's
name before the ranges, like this:
=COUNTIFS([Book1.xlsx]Sheet1!$A:$A,F2, [Book1.xlsx]Sheet1!B:B,F3,
[Book1.xlsx]Sheet1!C:C,">="&F4, [Book1.xlsx]Sheet1!C:C,"<="&F5)
Reply
Lydia+Noble says:
November 12, 2014 at 12:31 pm
Thank you so much Svetlana, you are a a life saver, thank you so much for your time. I
am trying the first part then I will venture on to the answers going in to another
worksheet. But I am guessing or hoping IO can use the paste link to do this! Thanks
again
Reply
55
Steve says:
November 10, 2014 at 8:00 pm
Hi thereI was wondering if I can use the COUNTIF function with a very specific conditional test. I
have a set of data by date where for one date in column A, there might be 4 corresponding
numbers in column B. Example:
9/8/2013 43
9/8/2013 45
9/8/2013 36
Is there a way to use COUNTIF to only count the appearance of a number greater than x
once per date? For the above, I would want it to only count once if the criteria were ">35".
Thanks,
Steve
Reply
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
29/56
6/29/2015
56
jai says:
November 11, 2014 at 3:38 am
Hi there
I want my excel spreadsheet to count letters in a row but with a unique condition behind
each letter i.e A=1, B=2, C=3, D=4, E=5, F=6 G=7
so if the cell in row F has b and row G has E total will 7
is there a way to do this?
jai
Reply
57
Matt says:
November 14, 2014 at 4:59 am
I have an excel spreadsheet that lists the different subjects that a student has
undertaken.
Example (cells N2:N9):
Information Technology
Physics
Advanced Maths
General Maths
English Research
English Critical
English Academic
Computer Applications
I would like to insert a formula underneath this (in cell N10), to look at the subjects the
student has undertaken, and return a result based on this search. I need to identify if a
student has undertaken all 3 English subjects listed. I have tried multiple formulas, but
cannot seem to get the right outcome, as I am searching on a range of cells (N2:N9).
Thanks
Matt
Reply
Svetlana Cheusheva says:
November 14, 2014 at 4:11 pm
Hello Matt,
Please try the following formula.
=IF(COUNTIF(N2:N9, "*engligh*")>=3, "Pass", "")
If it is not what you are looking for, please describe the result you expect to get in more
detail.
Reply
58
Steven says:
November 14, 2014 at 5:51 pm
I'm having an issue with compiling certain data.
I'm trying to find an overall percentage of participating users for certain questionnaires
they have answered. For example, I have:
=(COUNTIF('Sheet 1'!$C4:$Z4, "*CHI*")+COUNTIF('Sheet 2'!$C4:$Z4, "*CHI*")+COUNTIF...and
so on for 32 sheets.
While that's fine and all for those who participated in each questionnaire:
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
30/56
6/29/2015
59
Omar says:
November 18, 2014 at 4:17 pm
I want to count how many names appear in range C5:C11 from a list of names that I have.
That list I use in drop down menus in the range C5:C11. My names are Reid, Tyrone, Chris,
and Paul. I can select those names from the drop down menu. I want to count how many
names from the list are in that range. I tried countifs with not sucess
Reply
Svetlana Cheusheva says:
November 20, 2014 at 2:03 pm
Hello Omar,
You can use one of the following formulas:
=countif($C$1:$C$5," Reid") or =countif($C$1:$C$5,F2)
Where cell F2 contains the name Reid.
Reply
60
Meg says:
November 18, 2014 at 9:45 pm
Hi  I'm trying to compare two worksheets to see if an email address on sheet 1 is in a
range of cells in Column A in sheet 2. I've tried using vlookup and ifcount formulas but
neither are working. I removed all formatting from both sheets and I'm using Excel 2013.
Can you please suggest a formula or point me in the right direction? Thank you!!
Reply
Svetlana Cheusheva says:
November 20, 2014 at 1:52 pm
Hi Meg,
Please see this article:
https://www.ablebits.com/officeaddinsblog/2013/09/05/comparetwocolumnsremoveduplicates/
Alternatively, you can use the COUNTIF function. The formula will be as follows:
=IF(COUNTIF(Sheet2!$A:$A,$A2)>0,"Duplicate","Unique")
Reply
61
62
ALi says:
November 24, 2014 at 8:02 am
need to distinct sum ,distinct count,Distinct Average
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
31/56
6/29/2015
63
castle
castle
castle
castle
castle
castle
castle
castle
castle
Build
Build
Build
Build
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/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
32/56
6/29/2015
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
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
33/56
6/29/2015
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/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
34/56
6/29/2015
73
74
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
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
35/56
6/29/2015
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/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
36/56
6/29/2015
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
83
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$8G12) 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$8G12) 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/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
37/56
6/29/2015
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/visiblecolumninexceltables.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/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
38/56
6/29/2015
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/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
39/56
6/29/2015
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
30Sep14
30Dec14
30Jul14
30Jul14
30Jul14
30Jul14
30Sep14
30Aug14
30Aug14
30Dec14
30Dec14
30Dec14
7Oct1
30Sep14
30Dec14
30Dec14
30Jul14
30Dec14
7Oct14
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,"<=31/1/2013")
Reply
98
RandyS says:
March 4, 2015 at 2:29 pm
I have the exact same problem as Donna (Q95). Essentially, I'm trying to get a single total of
the number of projects where the actual completion date (column B, for example) exceeds
the proposed completion date (column A). Ive tried various formulas, including the one
Donna noted, with no success. Any help would be greatly appreciated.
Reply
Svetlana Cheusheva says:
March 10, 2015 at 3:21 pm
Hi Randy,
I believe you will need an array formula like I suggested to Donna. You can find a few
more examples in my recent article: Excel array formula examples for beginners and
power users. Hope this helps.
Reply
99
hmanji89 says:
March 5, 2015 at 9:25 am
Hi, I have a workbook with about 6 worksheets.
Each worksheet has to be filled with various values name age ....
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
40/56
6/29/2015
100
Bharat says:
March 6, 2015 at 6:32 pm
hi Svetlana Cheusheva..
I think you are a MVP.
I had gone through the your website and found that you have helped alot of people in
solving excel problems. .
I really appreciate your efforts.
I want to be excel expert like you tell me what should I do for that...
God bless you..
Reply
Svetlana Cheusheva says:
March 10, 2015 at 3:25 pm
Hello Bharat,
Thank you very much for your kind words. No, I am not an MVP, but I am lucky to work
with very talented and knowledgeable people and I've learned a lot from them. Reading
also helps : )
Reply
101
102
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
41/56
6/29/2015
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,"<15")
Reply
104
105
Nishant says:
March 18, 2015 at 12:38 am
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
42/56
6/29/2015
106
Roman says:
March 20, 2015 at 5:27 pm
Hello,
I need help with function Countif, so:
I want to count two cells for example: if cell A1=1 or cell A2=1 so count as 1, if one of these
cells equal 1, count as 1, if both cells equal 1, count 1 as well. How is it possible to do with
function Countif or with other function?
Thank you in advance
Reply
107
Kristy says:
March 21, 2015 at 11:30 pm
Hi,
I want to format Column A of a sheet. Column A has names and in columns B:M are the 12
numbers (175) associated to each name. In Q1:Z30 I have up to (depending on the day)
300 random numbers 175. I need the name in Column A to turn Pink when 9 of the
numbers match the numbers entered in Q1:Z30. Since there are up to 300 numbers
entered in Q1:Z30, some numbers are entered more than once. Here is the Conditional
Formatting formula that I am using that isn't working:
=SUM(COUNTIF($B1:$M1,$Q$1:$Z$30))>=9
The formula is counting each instance that it matches and adding those up, and when
those 12 numbers have been matched 9 times it highlights the name in Column A. I need
the formula to highlight when 9 of the numbers in B:M have been matched period, not
how many times they have been matched.
Thank you so much for your time!
Reply
108
jen says:
March 22, 2015 at 8:33 am
if any cell in column b equals a certain text then count cells in column c
post jan feb mar apr may
admin 10 20
admin 25 2
asst manager 10 17
asst manager 2 28
bartender 21
bartender 30
captain 15 15
captain 13 17
hostess 10 15
hostess 25 5
manager 16 14
manager 30
manager 25 3
manager 20 2
supervisor 20 10
supervisor 15 15
waiter 25
waiter 30
waiter 20
waiter 18
waiter 10
waiter 14 13
waiter 20
waiter 25
waiter 28
waiter 30
waiter 15
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
43/56
6/29/2015
109
Adam says:
March 26, 2015 at 8:41 am
I am trying to count how may times Toronto plays a game in the U10 age group.
Column A = Age group
Column B = Home Team
Column C = vs
Column D = Away Team
Age Group Team 1 Team 2
U8 Moncton vs Halifax
U9 Toronto vs Moncton
U10 Moncton vs Halifax
U12 Halifax vs Vancouver
U8 Toronto vs Vancouver
U9 Halifax vs Toronto
U10 Toronto vs Vancouver
U12 Vancouver vs Moncton
U8 Vancouver vs Halifax
U9 Toronto vs Moncton
U10 Moncton vs Vancouver
U12 Vancouver vs Moncton
U8 Vancouver vs Toronto
U9 Moncton vs Vancouver
U10 Toronto vs Moncton
U12 Halifax vs Fredericton
Reply
110
Athi says:
March 26, 2015 at 10:11 am
Hi
I want to know whether it is possible to get the count of cells that are not empty.
Reply
Svetlana Cheusheva says:
March 26, 2015 at 1:55 pm
Hi Athi,
Of course, this is possible. Please check out the following examples:
Count blanks and nonblanks
Reply
111
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
44/56
6/29/2015
112
113
Milkesh says:
April 1, 2015 at 10:47 am
I want to know whether its possible to calculate and if yes what are the tags to find out
whether the values have crossed the certain threshold and if it does can the names of
whoever has crossed can be displayed
Reply
114
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
45/56
6/29/2015
115
Ricky says:
April 2, 2015 at 11:14 am
Hi Svetlana,
Thank you for publishing this page and always being active to respond.
I am stuck with a Problem :
Query : Count of projects between 01/01/2015 and 01/31/2015 whose status is ABC OR XYZ.
From your forum I could do it for Count of project Less than 01/31/2015 but that will
include all 2014 and 2013 projects also.
I used the following formula for this :
=COUNTIFS(Details!D17:D33,"<01/31/2015", Details!E17:E33,
"ABC")+COUNTIFS(Details!D17:D33,"<12/31/2014", Details!E17:E33, "XYZ")
Could you please help out with date range for this.
Reply
116
Sat says:
April 7, 2015 at 3:41 pm
Hi,
Is there any way we can figure out a formulae for this tracker. Basically tracker should
automatically calculate the blood samples drawn 12 months from the day they signed the
consent form.
Eg if patient signed consent in 27/07/2013 and the bloods are drawn until end of JULY
2014, the tracker should calculate signed consent + 365 days.
Thanks a lot in advance.
Reply
Svetlana Cheusheva says:
April 10, 2015 at 1:40 pm
Hi Sat,
I think it is possible. For me to be able to suggest a formula, please explain the structure
of your data, i.e. what columns contain signed consent dates and blood drown dates
and probably patients' names. Also, what exactly you want to get as a result  the expiry
date for each blood sample or something different?
Reply
117
Dan says:
April 13, 2015 at 10:40 am
Hey, great post, and thanks for the pointers! I have a basic timesheet for work and would
like to count the days spent on each project. Are you able to tell me how I can redirect the
condition to another cell? So that:
=COUNTIF(timesheet!$C$4:$G$500,"project A")
would become:
=COUNTIF(timesheet!$C$4:$G$500,"cell reference that redirects to the beginning of the
row, which is where the project is named")
This way, I will be able to remove the need to enter the project name twice and the risk of
an error due to billing days for project A against project B.
Thanks!
Reply
118
Ben says:
April 14, 2015 at 11:23 am
Hi Svetlana,
I am trying to figure out how to formulate a countif function where I am trying to measure
exposure on certain loans on any given date. I have a bunch of loans, the amount
pertaining to that loan and the respective maturity/expiry date. Essentially, I am trying to
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
46/56
6/29/2015
119
120
Calin says:
April 20, 2015 at 6:22 pm
Hello Svetlana,
I need help with the following problem. I have a column with 4 different values:
Column A
39
19
20
0
20
19
19
19
0
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
47/56
6/29/2015
121
Lidiya says:
April 21, 2015 at 8:07 pm
Hi,
I was wondering if it is possible to count partial matches in the following example:
Orange juice
Apple juice
Juice
Coca Cola
So would want the count if formula return 3. I believe if I use *juice it will count only the
first two, as "Juice" doesn't have anything in front of it.
Thanks!
Reply
Svetlana Cheusheva says:
April 22, 2015 at 9:45 am
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
48/56
6/29/2015
122
Help says:
April 22, 2015 at 4:58 am
I have a table with numbers in Columns F, G, H, I, and J. There is an identifier in Column B.
I need the average of all numbers in Columns F, G, H, I, and J where the identifier in
Column B = A14 (i.e. the value in A14).
I tried the following:
=AVERAGEIFS('HoursBackup'!F3:J1048576,'HoursBackup'!B:B,'Group Dashboard'!A14)
This results in a #VALUE! error.
I can't figure out what the problem is. Any help would be appreciated.
Ultimately, I want to make it so that the function ignores all cells that are nonnumeric or
blank. In other words, I don't want it to assume that blank cells are 0 for averaging
purposes.
Thanks!
Reply
123
124
125
126
Lori says:
May 8, 2015 at 4:32 pm
Hi Svetlana,
I have an excel table to keep a running balance of the decreasing loan amount, as
payments are made (see excerpt from table below).
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
49/56
6/29/2015
127
128
Keith says:
May 11, 2015 at 7:58 pm
I am trying to keep track of attendance of employees for the current month. I have a
formula that will calculate the last 30 days for the attendance code, but instead of last 30
days I would like for current month only:
=COUNTIFS(Attendance!$B:$B,$B5,Attendance!$E:$E,"CIO  CI OUT",Attendance!$C:$C,">"&
(TODAY()30))
I have 2 separate sheets  Attendance sheet which is the sheet I log attendance to, and the
other sheet where I am placing my formulas on. Here is a breakdown of everything from
that formula above
Counts for that employee if it meets all of the following criteria:
**Attendance!$B:$B,$B5 >> Employee Name (want to count specific employee)
**Attendance!$E:$E,"CIO  CI OUT" >> Attendance code (want to count specific attendance
code)
**Attendance!$C:$C,">"&(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/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
50/56
6/29/2015
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
132
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
51/56
6/29/2015
133
Kendra says:
May 30, 2015 at 7:07 pm
Hi  I have a baseball schedule and trying to see how many times each team has a early
and late game. I have used the countifs but can't get it to work.
Away Team # Vs Home Team # Time and Diamond
1 vs 2 715 P
3 vs 4 845 P
5 vs 6 715 D1
7 vs 8 845 D2
11 vs 12 715 D1
9 vs 10 845 D2
12 vs 1 715 P
10 vs 3 845 P
8 vs 5 715 D1
6 vs 7 845 D2
4 vs 9 715 D1
2 vs 11 845 D2
Thank you, Kendra
Reply
Svetlana Cheusheva says:
June 1, 2015 at 12:43 pm
Hi Kendra,
And how do you determine whether it's an early and late game?
Reply
134
Joe says:
June 3, 2015 at 12:54 am
Hi, I have a spread sheet where I have a resident name in column A and a hall number in
column B. There are multiple residents on the same hall, and sometimes the resident is
listed more than once. I want to count the number of times a hall is listed, but no
duplicates(i.e Joe 100
Bill 200
Joe 100
Chris 300
Maple 100. So I would want to find out how many times 100 is involved without the
duplicate so the count should be 2. Can you help me? thanks,Joe
Reply
135
Angelina says:
June 3, 2015 at 5:36 pm
Hello,
I have the following data:
Column A Column B Column C
Estimate Percentage Percentage Expected
(days) Complete Remaining Result
0 0 Not Required
5 25 3.25
1 75 .25
Not Required 0 Not Required
So, those fields that are not a number and are equal to zero should not be calculated, but
for the formula used to calculate "Percentage Remaining", it is: Column A * (Column B
/100)
So, my question is: How do I exclude the calculations that are zeros and are not numbers
in Column A and Column B?
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
52/56
6/29/2015
136
Jose says:
June 8, 2015 at 8:50 pm
Hi,
I know how to do this using PIVOT, but I have a non power user that will use a template
sheet in excel and I'm trying to help him to get a count duplicates cases based on a
condition.
Case Cause Dealer
447839 L CA
447839 P CA
447839 S CA
448387 L CA
448387 P CA
447646 L PH
447646 P PH
447647 L PH
447647 P PH
447648 L PH
447648 P PH
In above example CA have 2 cases and PH have 3 cases. Using PIVOT is easy to get the
result rather then calculating through transactional data but the user isn't PIVOT oriented
and I tried hard to trained.
How I can achieve above summary results using a function/complex formula.
Anticipate thanks,
Jose
Reply
137
shwetha says:
June 15, 2015 at 12:04 pm
Hi,
Can you help me out in finding the hours in an column G which is >4 <6 and =6.
time is in 4:00:00 formate and also i need to find no 4 to 6 in same column
Thanks
Shwetha
Reply
Svetlana Cheusheva says:
June 15, 2015 at 12:16 pm
Hi Shwetha,
You can use the TIME function in your criteria, like this:
Times greater than 4: =COUNTIF(G2:G100, ">"&TIME(4,0,0))
And use analogous formulas for other calculations.
Reply
138
Adam says:
June 15, 2015 at 1:05 pm
Hi Svetlana,
Looking for an idea for a function. I'm pulling data from one spreadsheet with account
numbers assigned to different agents, and trying to compare it to the number of entries
made in our sales database for these accounts. The problem is, the database entries
contain the account numbers, but also contain other text/numbers as well. Any
suggestions? Thank you!
Reply
Adam says:
June 15, 2015 at 1:42 pm
After tinkering around with it, I think the main point of my problem is getting the
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
53/56
6/29/2015
139
Sooraj says:
June 19, 2015 at 9:00 pm
Hi Svetlana,
I have some data like this in a column. If am giving formula (=COUNTIF(A1:A2000, A1)) to
count the number of repetition of each number its not getting counted properly. Its taking
into con sideration only few entries. May be coz character are more than 19. Is there any
way to count the repetitions if the number of character in a cell is more than 19.
89XXXXXXXXXXXXXXX44
89XXXXXXXXXXXXXXX36
89XXXXXXXXXXXXXXX28
89XXXXXXXXXXXXXXX10
89XXXXXXXXXXXXXXX02
Reply
140
nikki says:
June 21, 2015 at 1:41 pm
Please help me to solve my assignment I dont know how...
Count if
ABC
1. 10 20 15
2. 5 25 4
3. 3 6 2
Count if
1) 52
2) 15
3) 1525
Reply
Svetlana Cheusheva says:
June 22, 2015 at 10:24 am
Hello Nikki,
Here you go:
1) 52 =COUNTIFS($A$1:$C$3, "<="&5, $A$1:$C$3, ">="&2)
1) 15 =COUNTIFS($A$1:$C$3, "<="&5, $A$1:$C$3, ">="&1)
1) 1525 =COUNTIFS($A$1:$C$3, "<="&25, $A$1:$C$3, ">="&15)
Reply
141
Murugesh says:
June 21, 2015 at 2:50 pm
Can you please give me solution for my earlier email?
Reply
142
d says:
June 22, 2015 at 7:27 pm
Hi,
I need to count the amount of profitmaking enterprises:
*
SAMA001_ALFA 100 90
SAMA003_BETA 120 200
...
THANK YOU
Reply
d says:
June 22, 2015 at 7:31 pm
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
54/56
6/29/2015
143
Gary says:
June 24, 2015 at 10:57 am
Hi Svetlana,
I am using excel 2003 :(
I am trying to count how many cells in column D contain a specific text, IF the dates in
column F are greater than 6 months ago from today.
I have tried this:
=SUMPRODUCT((D4:D16390=D4)*(F4:F16390="<="&TODAY()180))
But cant seem to get it to work, just shows 0.
Many thanks!
Reply
Svetlana Cheusheva says:
June 24, 2015 at 11:14 am
Hi Gary,
Try the following array formula:
=SUM((D4:D16390=D4)*(F4:F16390<=TODAY()180))
Remember to press Ctrl+Shift+Enter to complete it.
Reply
Gary says:
June 24, 2015 at 11:36 am
Hi Svetlana,
Perfect! Thank you very much for that!
Reply
144
Lidiya says:
April 29, 2015 at 8:45 pm
Hi Svetlana, It does work, you're right. However, in my real life example, I am using
numbers instead of words, and it is not working.
12.33
12.33WR1
12.35
Count if should return 2, as I want to count all "12.33"&"*"
Reply
145
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
55/56
6/29/2015
Post a comment
Name
Name
name@example.com
Send
Unfortunately, due to the volume of comments received we cannot guarantee that we will
be able to give you a timely response. When posting a question, please be very clear and
concise. We thank you for understanding!
https://www.ablebits.com/officeaddinsblog/2014/07/02/excelcountifexamples/#countifsyntax
56/56