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

Use only Month and Year from date as criteria in countifs?

I have an excel countifs formula with multiple criteria: =COUNTIFS('Opp Data'!$E:$E,Home!$B11,'Opp Data'!$B:$B,Home!$D11) My dates appear in column B on my Sheet OPP Data like so: 28/03/2016 21/04/2016 My lookup value in D11, D12 etc, will appear…
G_Man97
  • 37
  • 2
  • 7
0
votes
3 answers

Counting number of cells between date range of a related column

Excel question Two columns and want to count the cells in column 2 if they are between two chosen dates in column 1 column 1 column 2 Date of order order id 11/11/2008 4361 12/11/2008 4363 13/11/2008 …
WillD
  • 151
  • 1
  • 10
0
votes
2 answers

excel countifs with AND & OR

I'm trying to create an Excel function that counts instances that meet 3 criteria. For example data in sample data, I want to: 1)For each type of 'Structure' count number of rows in which 2)'Horizontal' is greater than zero, OR 3)'Vertical' is…
0
votes
2 answers

countif syntahx in vba

I was coding a loop, and i was wondering why my macro doesn't work. The idea of the macro is to determine the month's number of weeks. With knowing the name of the fisrt workday of a month i can countif the number of this occurence in a range of…
R.Omar
  • 141
  • 1
  • 2
  • 11
0
votes
2 answers

Excel count unique values per row?

I am trying to use a count if function that will count -1 where it exists in each row. The problem is, i may sometimes have 1, 2 or 3 instances of -1 in any one row. However, i only want to count the first instance of -1 for each…
G_Man97
  • 37
  • 2
  • 7
0
votes
1 answer

VBA COUNTIFS double criteria match statement

I'm trying to count based on two criteria conditions being met using COUNTIFS. I can get it to work Im using one criteria but when I use two it throws an error "Expected: end of statement. myworksheet.Cells(1, "A") = "HIGH" myworksheet.Cells(1,…
infoseclearner1
  • 13
  • 1
  • 1
  • 4
0
votes
2 answers

Using COUNTIF down a column instead of across rows for multiple rounds

I have a large amount of data set up in the form of rounds. I need to count down the 'Round' column while counting if '1' occurs in the 'Prediction' column. I know how to do this manually but I have over 200 rounds I need to account for. I'd like to…
raine
  • 29
  • 8
0
votes
2 answers

countif within R repeated across each row

I'm having trouble trying to replicate some of the countif function I'm familiar with in excel. I've got a data frame, and it has a large number of rows. I'm trying to take 2 variables (x & z) and do a countif of how many other variables within my…
Jason
  • 15
  • 4
0
votes
2 answers

Excel counting certain cell range in row if other cell matches column

So I inherited an Excel file that is used to schedule and track PTO and OT time for about 100 employees. They have a column for every day of the year and have the year split over two sheets. I am trying to create a totaling sheet that shows a…
Matt Fr
  • 1
  • 1
0
votes
3 answers

Excel Countif - Need no. of cells in a row that have a date greater than specific date

I have a table like this, where I want to insert formulas in column B to arrive at the indicated values. The logic is this - I want to count every alternate cell in that particular row, starting from column C till column AA, and get the number of…
user3164272
  • 565
  • 1
  • 9
  • 20
0
votes
3 answers

Excel combining countifs and left function

I have a list that I'm checking against the main data. The main data looks like: 1234 1 1235 1 1234 1 1213 2 1231 2 1212 2 1231 3 1231 3 etc The list I'm checking against the main data is: 1 2 3 etc For each number in my list, I want to…
user47467
  • 1,045
  • 2
  • 17
  • 34
0
votes
3 answers

countif in excel based on column header

How to count TtlA, TtlB and TtlC base on column header? Thanks |TtlA |TtlB | TtlC | A | B | C | A | B | C | A | B | C | | 3 | 2 | 2 | x | x | | x | | x | x | x | x |
Erix_TK
  • 35
  • 1
  • 8
0
votes
1 answer

If a name in a column is a match, count certain text in the row

I have a column/list of duplicate names. In the corresponding row/columns of duplicate names, some cells contain "Truant." Another column contains the unique names off that same list. I want a formula next to the Unique name (listed once) that shows…
0
votes
1 answer

How to count common cells (same value cells) from two different columns?

I have a sheet like below: A B 123 12 456 456 11 11 I want to count the cells having the same value in column A and B. From the above example, I expect 2 (456 and 11 are both in column A and B). Here are some formulas I tried…
Stephan
  • 41,764
  • 65
  • 238
  • 329
0
votes
1 answer

Excel - Count first time contributors

What I would like to do is count the amount of first time contributors by month. So for January, there were 3 people that contributed in January for the first time, 1 in February, and 1 in March. I wasn't sure how to write a countifs function…
dmar
  • 1
  • 2