2022 Developer Survey is open! Take survey.

# Questions tagged [countif]

COUNTIF generally refers to a worksheet function within a spreadsheet program that counts cells in a range based on a specified condition. This tag can also be used for COUNTIFS, which provides a similar function but allows multiple ranges and criteria.

179 questions
Filter by
Sorted by
Tagged with
46 views

### Find number of files deleted

I want to know how many files deleted thru batch script. I found a script and modified it but it does not work. Any idea how to fix it. set-location d:\testing -ErrorAction stop # Change ...
• 51
21 views

### How do I count how many times this category appeared only if the value in the column name is not equals to "N/A"

I have these sample data:https://docs.google.com/spreadsheets/d/1TSpuMRktIRAoACH5s1Dk9189NsNpJwjRtNaR5QROZg8/edit?usp=sharing I wanted to count how many times a certain category has appeared only if ...
32 views

### COUNTIF with formula expression

I have a grid with header names in the first row and first column, e.g.: A B C D A B C D The cells with the same header name in their row and column represent "valid" value for the ...
16 views

### Identify first occurrence of group of repeated values in excel, but groups could be repeated

So I have a column in excel that looks like the first column in this screenshot: Data screenshot The "existing result" column comes from this formula which is easily found from googling: (...
25 views

### Countif with literal array

Why does this formula not work: COUNTIF({1,2,3},2)? I can use both COUNT() and COUNTIF() with a range, but I can replace the range with a literal array only on COUNT, not on COUNTIF. If I use LET to ...
• 113
14 views

### Am I doing this right? Comparing the mean and countIF for the likert-scale results

I have these for the likert scale Likert scale range When I calculated for the mean, it shows a value for 4.3 which means, this will be under the "Agree". But then, if I'll do a COUNTIF, it ...
36 views

### Excel COUNTIFS where the condition is row-specific

I am trying to do a COUNTIF on the following data where the criteria is row specific and does not link to a specific value or cell. For example, in the following example, I am trying to count the rows ...
45 views

### MS Excel COUNTIF to math equation

For publication, I need to convert the following MS Excel formula to a math equation: COUNTIF(\$A\$2:\$A\$10416,"<2")-COUNTIF(\$A\$2:\$A\$10416,"<1") I use this to count how many ...
1 vote
26 views

### Need to lookup values in row and give the corresponding month in the column

I need a formula that looks up the number of sales in a month and stage and gives you the highlighted cells in the columns. It has to count the first cell that the sales start in and then if you have ...
• 11
26 views

### Implementing COUNTIF function with a changing string criterion

I have a long list of business licenses in Excel. I have a separate list of all the unique names of the licenses and I want to use a COUNTIF function to count how many times each license comes from ...
51 views

### Count number of matchups

I use a spreadsheet to track tennis matches played and the result with two friends. I am wanting to count the number of times that each matchup occurs. For example the players are Byram, Heck, and Ray....
50 views

### Excel: Count number of duplicates in row for unique records

I'm looking at repeat enrollment data that varies between two text responses "enrolled" and "not enrolled" over 24 columns, each column represents a consecutive term. The dataset ...
• 23
1 vote
114 views

### Counting the number of times a name appears next to a date

I currently have a pivotTable where each row is a date and each column is an employee. The values in the intersection are the sum of the hours worked that day. From another sheet/tab, I would like to ...
51 views

### Excel creating a pivot tablet

enter image description hereI'm trying to create a pivot table so that I can make a Chart to show how many of each item is on the report. However since some are missing multiple we seperate them in ...
1 vote
115 views

### COUNTIF across multiple sheets does not work with SUMPRODUCT

I have the two sheets below. (The example table above is highly simplified for this question) I'm trying to write a formula that adds the total occurrences of A under the year 2017 (Answer is 3). ...
90 views

### Transposed counts for many columns

The input: I have to get the count of the number of '1' and '0' in each column like this: Is there any way in Excel/macro to do this?
• 23
1 vote
112 views

### How do I count multiple levels of referrals (A referred B, B referred C, D & E, E referred F, G, H, I, etc)?

I have a referral system where you get credit for referring other customers. If those customers refer other customers they get some level of credit for those as well. We need to count not only how ...
• 99
68 views

### Distinguish between A* and A in excel

I’m creating a spreadsheet to be used in schools that use various countifs, subtotals etc to look up data. A big problem I have is that I need to distinguish and count separately students on an A* (A ...
• 11
1 vote
54 views

### Counting and sorting a cell in excel

I need help to sort out a list of agencies. I have now gotten the frequency for each agency but I need them to match. Then, I need to sort out this list from Largest to Smallest frequency. That means ...
• 15
1 vote
27 views

### Multiple conditions, if/or statement ask

I need to write a formula based on multiple conditions, that calculates what percentage of data is completed for each entity. I have created an example dataset below. The condition that will change ...
31 views

### I am trying to generate a value count if true, if it falls within a date range

I typed this formula but am getting an error... can anyone help? =COUNTIFS(West!N6:N26,true,[West!C6:C26,>=1/1/21,date range,<=1/31/21])
357 views

### How do I keep my COUNTIF function from counting my column header?

I have a column filled with dates and am trying to count all the cells after a certain date, using COUNTIF(A:A,">"&DATE(xx,xx,xx)). The problem is it keeps including my column header (...
26 views

### what is the mistake in usage of countifs in excel

I am trying to count number of objects category orbit and criteria > 10 here is my excel sheet https://drive.google.com/file/d/17_aKgd5__R3o4mUMy2sJAuIwpk42aEol/view?usp=sharing I used following ...
• 109
2k views

### My Excel COUNTIF function always returns "0"

I am trying to count how many cells do not start with U, D, or R, appear before 15:00 pm and match a certain date (A4). I am using this function: =COUNTIFS(Sheet1!\$B\$2:\$B\$1088,A4,Sheet1!\$C\$2:\$C\$1088,&...
• 1
1 vote
105 views

### MS-EXCEL How to Rank three columns together using countif

I am trying to rank these three columns based on the minimum values in all three simultaneously, using the formula shown in the picture. But somehow, it selects the values that aren't minimum in one ...
• 11
1k views

### Counting cells with formula that don't return blank

I want to count the number of non-"blank" cells in a column. I have a column of cells with a concatenate() for their corresponding row, i.e.: =CONCATENATE(I10,J10,K10) =CONCATENATE(I11,J11,...
1 vote
317 views

### How can I nest a SUMPRODUCT by month within COUNTIFS for three conditions

How can I nest a SUMPRODUCT by month within COUNTIFS for three conditions. I need to count the number of items that are "Issued" in the status column that were issued within a specific year &...
• 11
80 views

### How to use a COUNTIF while simultaneously grouping duplicates?

So I have the following table I'm trying to create a summary in another tab that counts the number of codes by Phase as well as the number of Platforms. For the number of codes, I'm able to use a ...
304 views

### Count first cells in a range of rows, which are higher than 0 and meet criteria

For each column, I would like to count the amount of cells, which are higher than 0, appear for the first time in the row, and meet a criteria in one of the columns. In this example, I would like to ...
85 views

### Inputting several values, found from a VLOOKUP function, into a COUNTIF function

This question is about a single function (in a single cell to later extrapolate over a whole table) in Microsoft Excel. I want to find a unique id on another page (amongst other id's in the first ...
1 vote
191 views

### Counting unique values against a subset of a list

I'm trying to count how many unique supervisors a particulate employee has. (See an example data set below.) I'm able to do this in a round about way, but I'm wondering if any of you experts out ...
• 113
1 vote
208 views

### SUMIF versus SUMIFS

SUMIF allows to sum using a single criteria, where SUMIFS works with multiple criteria. I tend to find that on many occasions, I've start with SUMIF and then need to add more criteria, so change the ...
• 395
48 views

### Need To Count Total Number Of Instances Of Values In A Column And Return The Results In Other Cells

I have a situation where I need to count the total number of instances of values in a column and return the results in other cells. Users are going to be provided this Excel sheet as a template and ...
43 views

### How to combine multiple COUNTIF in Excel?

I have this formula: =OtherSheet!\$B\$2*COUNTIF(C6:CX6;OtherSheet!\$A\$2) It looks in the columns to the right and for each occurrence of a string from the other sheet's A2 it adds the other sheet's B2. ...
• 101
79 views

### Why does my Excel COUNTIF function always return a value of “0”?

My HTML is: div class="medium-insert-images" data-media-id="47deed170ef76561" data-original-width="590" data-original-height="350" contenteditable="false"figure img src="https://cdn-blog.scorum....
1 vote
27 views

### Multiple values same line COUNTIF

I have a table as follows for a musical instrument casting sheet [titled Song Casting) Here's an MWE: +--------+------+--------+-------+------+--------+---------+ | Song | Bass | Guitar | Drums | ...
• 111
65 views

### Counting the occurence of active durations by month and into a graph

Lets assume I currently have a spreadsheet that holds the dates of members at a crossfit gym and the duration of their memberships. Date Started Date Ended Member Name 11/27/2019 12/19/2019 ...
251 views

### Excel "IFS" criteria values using cell references

My data consists of a month column A (1 through 12) and a values column B (financial returns) spanning multiple years. How do I count the number of month occurrences in the second half of the year ...
279 views

### How to COUNTIFS with OR and >= Operator logic

I've found threads that addressed OR logic or operator logic but none together and it's not working for me. Let's say I have a table like this: Col1 Col2(Date) Col3(Date) I want to use ...
1k views

### How to count distinct values in one column for each distinct value in another column in MS Excel?

Say I have the following data in an Excel sheet: Country Fruit USA Banana USA Apple USA Apple USA Orange USA Banana USA Apple UK Banana UK Banana UK Apple I ...
• 105
86 views

### Excel - Indirect Formula

another question regarding Excel Indirect Formula. I have columns E1:J202 filled with one of the following: Green Amber Red How can I use the indirect formula to count each of the above separately ...
34 views

### Count of number of times a max of the dates in two columns is bigger than the date in the third column

I have three columns in a report: a closure date (Col A), an implementation date (Col B) and a target date (Col C). I need to count the number of times an entry is closed or implemented before the ...
1 vote
279 views

### Countif Date Array Formula

I'm trying to build a sheet for tracking compliance with training. I'm needing to build some summary fields, which show how many procedures a person is current on, how many they are out of date with, ...
• 113
3k views

### Count cells in a column between values until specific value reached in Excel

I am trying to count cells from a column between two values: I have a list which on the range A2:A118. I want to start counting when a specific value is reached and stop when another specific value is ...
41 views

### Finding Unique Values across many columns

I'm working on what I thought would be a simple task that has become quite complicated. In Column A, I have a Field Name. In columns B through ANV (1059 columns) I have values associated with that ...
57 views

### Count number of rows that have X in cell A or B or C

I think looking at the photo is the easiest way to show what I need: Original Table How do I set up a single formula to count the number of kids who failed an exam section? What I've managed so ...
1 vote
663 views

### Count how many times string is contained within string within a range in excel

I would like to parse through URLs and count how many times a string e.g. 'apple' occurs within a range. I tried =COUNTIF but it's looking for exact matches. I have about 80k rows of URLs and I need ...
• 111
71 views

### Count If Formula for 2 Separate Criteria

I am trying to write a CountIf Excel formula for 2 separate criteria on the same range. The range consists of a formula that generates a 1 or 2, so the Countif formula tells the user what category ...