Questions tagged [countif]

COUNTIF is an Excel function which allows for the counting of values in a range where the values meet a criterion.

Microsoft describes the syntax so:

COUNTIF(range, criteria)

The COUNTIF function syntax has the following arguments:

Range Required. One or more cells to count, including numbers or names, arrays, or references that contain numbers. Blank and text values are ignored.
Criteria Required. A number, expression, cell reference, or text string that defines which cells will be counted. For example, criteria can be expressed as 32, ">32", B4, "apples", or "32".

Note

o You can use the wildcard characters - the question mark (?) and the asterisk (*) - in criteria. A question mark matches any single character, and an asterisk matches any sequence of characters. If you want to find an actual question mark or asterisk, type a tilde (~) before the character.

o Criteria are case insensitive; for example, the string "apples" and the string "APPLES" will match the same cells.

COUNTIF has been appreciated for checking whether a value is present in a list of values (Super User).

The COUNTIFS function, introduced with Excel 2007, allows for multiple criteria and ranges within a single function, though more than one COUNTIF may be combined to similar effect.

1796 questions
0
votes
1 answer

Excel VBA sub to fill a column with Countifs

I want to automate a Sub routine to work on 15 000 rows. I have customer that either computer, vdi and other IT equipment. Each row is a record of the name of customer with the it equipment they have. I analyze the how many computer each customers…
Mardhain
  • 13
  • 1
0
votes
1 answer

Countifs and ranges

I'm trying to write some code that requires a cell value to be within a range of dates. This is what I have written so far (albeit a few name changes for simplicity): =IF(COUNTIFS('[SheetA.xlsx]TabA'!A2:AA2, "submit", '[SheetA.xlsx]TabA'!B2:AB2,…
0
votes
2 answers

Using INDEX, MATCH and COUNTIFS to filter and match data in Excel. Formula incorrect?

I am trying to use INDEX, MATCH and COUNTIFS in excel to filter for relevant data within 2 spreadsheets. However, the formula below only returns the first value of per the matched criteria and replicates this value throughout the identified…
laureen85
  • 5
  • 1
  • 4
0
votes
1 answer

Excel countifs overlapping criteria

This is a follow-up to a prior question, Excel countif multiple criteria overlapping ranges and multiple lines. I now have to do this as a rear-view so instead of showing the number of people who were members in the target month but not three…
ajbentley
  • 193
  • 1
  • 10
0
votes
1 answer

Countif with average

I have the data below A B 1 3 3 2 2 5 3 1 2 4 3 5 3 I want to take the average of column B and if column A contains a value of 3 that is unmatched in its corresponding row in column B, include it in the…
User247365
  • 665
  • 2
  • 11
  • 27
0
votes
1 answer

COUNTIF Partial Match

I am working on a password audit, and one of the tasks I'm trying to solve is counting the number of instances a username is present in the password. For instance, the username might be 'mikeb' and their password is 'mikeb123'. Searching for a…
Tchotchke
  • 399
  • 1
  • 2
  • 18
0
votes
2 answers

Count Negative in Range

I am attempting to count the number of occurrences that contain a * in a specific numeric range using the COUNTIFS function in Google Sheets. The function works for a positive range, but fails when I add a negative. I have tried escaping the…
0
votes
2 answers

Sum first five instances in Excel

I have an Excel table with three columns. Column A has a list of countries, Column B has a list of cities in each country and Column C has populations of those cities. The way the table is structured makes it so that Column A will have repeated…
franciscofcosta
  • 833
  • 5
  • 25
  • 53
0
votes
1 answer

Why does the countif function only works if I am in the same worksheet?

I hope someone can help me. I've got two columns with reference numbers in column C and N in one worksheet in excel. column C: AAAA1 ABAA3 KDFG4 ... Column N: ABAA2 AAAA4 MMMM3 ... Then I add the formula 'left' into the columns A and L to cut…
0
votes
1 answer

SUM/COUNTIF in excel 2013

I'm having some issues with a formula. In the formula I'm trying to sum the number of items in column E based upon the condition in column C.The formula I've used is, (which is working…
gmainak
  • 1
  • 1
0
votes
1 answer

Sum of number of times unique value appears in Excel

I have an Excel table with a list of countries, cities and preferred transports, such as the one below: I want to build another table where, for each country, I want to signal the number of transport modes which are repeated, like the one…
franciscofcosta
  • 833
  • 5
  • 25
  • 53
0
votes
2 answers

Using Countif on Dates in R

I have the following table **A** | **B** | **C** |**D** | :----: | :----: | :----:|:----:| 1/1/17 | 3/1/17 |4/1/17 | H | 1/1/17 | 3/1/17 |4/1/17 | H | 2/1/17 | 4/1/17 |5/1/17 | V | 3/1/17 | 5/1/17 |6/1/17 | V | 4/1/17 | 5/1/17 |7/1/17…
dhu
  • 11
  • 3
0
votes
1 answer

Excel countif multiple criteria overlapping ranges and multiple lines

I've got a membership database and am trying to figure out what the dropoff is for a rolling 3 month period. My current thought is that I need to count if the first cell is not blank (meaning the person wasn't yet a member) and if either of the…
ajbentley
  • 193
  • 1
  • 10
0
votes
1 answer

Using isoweeknum with the countif function

I'm wondering how I could combine the isoweeknum function with an if function without a helper column. For example I'm looking to do =COUNTIF(A:A, ISOWEEKNUM(A:A)=27) Which would count all columns when isoweeknum returns 27. I've also…
Joseph Noirre
  • 387
  • 4
  • 20
0
votes
0 answers

Countifs with concat, and char to count large amounts of specific data

So here is a tricky one that I cannot seem to get past and I'm not sure if there is even a way for it to work. My formula is as follows: =COUNTIFS($A$2:$A$1469,CONCAT(CHAR(34),CHAR(42),LEFT(A1479,10),CHAR(42),CHAR(34)),$B$2:$B$1469,"No Card on…
Seabhach
  • 41
  • 4