# COUNTIF For Date Ranges

Oct 27, 2009
i had some formula provided by this site which seemed to work but is now resulting in #N/A or a zero value - can you take a look?

=SUMPRODUCT(('Report X'!$J$6:$J$10000="2")*('Report X'!$E$6:$E$10000>TODAY()-30))

Report X contains 2 relevant columns... E contains the date created for each item, J contains the type of each item - in this case i wish to see how many items '2' there are in the last 30 days

Report X is a daily report copied into the same tab each day - so the data will change every day depending how long each item is still in the system

this formula does work in the example sheet i provided but not in the spreadsheet in which i need it to work!

i also have similar formulas to calculate how many items are present in between 30 and 60 days exist, and how many over 60 days - all return the value "0"

column E containing dates is in the format 01/10/2008 - changed using Ctrl F - replace to amend it from 01.10.2008

View 9 Replies
ADVERTISEMENT
Mar 19, 2009

I am having trouble writing a COUNTIF formula that will tell me how many times a particular month appears in a list of dates. January may appear 10 times, February may appear 43 times, March 102 times, etc. Instead of manually selecting the range for each month and using the count feature on the status bar, I need a formula that will count for me.

I tried:

COUNTIF(B:B,month(1))

COUNTIF(B:B,month=1)

as well as several other lame attempts, but kept getting a result of zero or an error.

View 9 Replies
View Related
Aug 28, 2008

I have 2 ranges with values, and I want to use countif to see of there's a same value in each of these ranges.

View 9 Replies
View Related
May 14, 2007

I'm attempting to use the countif formula to make sure a number is entered only once in 4 nonconnected ranges, I492:I496, I499:I503, K492:K496 and K499:K503. I've tried everything I know and as I'm self taught and my teacher is an idiot, I'm not having any luck.

View 14 Replies
View Related
Jan 20, 2010

Countif: Is there a way to have a single criteria (a persons name) and multiple ranges example: a6:a10 c6:c10 and recieve the sum of that criteria and ranges?? I know there is I just cant get it.

I need to count a persons name entered in multiple ranges (cells or areas) on the same worksheet. I cannot make one big range because i will need to do the same for the b6:b10 but for a different "need" the a colum and c colum bieng "completed" the b colum bieng "not completed". I have tried =countif(a6:a10 + c6:c10, cell_with _persons_name) and for obvious reasons that wont work,

View 5 Replies
View Related
Sep 29, 2011

Is there a more efficient way to collect information from multiple ranges than using the COUNTIF and adding them together, such as

COUNTIF(Range,Criteria)+COUNTIF(Range,Criteria)+COUNTIF(Range,Criteria), etc?

I know my way around Excel, but I really do not understand much about VBA

View 1 Replies
View Related
Jan 10, 2008

I am using a work sheet where I want to count if Column A has one criteria and column B has another

example

column B states is used to track contracts it can be vendor

column L tracks status it can be open, received, or closed

I want to count the cell if the vendor name matches and the status is open

also if that is possible is the same possible with 3 ranges and criterias?

View 9 Replies
View Related
Oct 30, 2009

How to use COUNTIF when there are multiple criteria. For eg. I have 3 columns, and I want to count the # of employees in each row if all 3 criteria in columns C, D, and E hold true.

View 9 Replies
View Related
Jul 1, 2007

Does COUNTIFS not work with named ranges/dynamic ranges? Everytime I try, I get a #VALUE! error. These are my 2 dynamic ranges:

ResultsM=OFFSET([results_list.xls]Results!$M$4,0,0,COUNTA([results_list.xls]Results!$M:$M),1)

ResultsQ=OFFSET([results_list.xls]Results!$Q$4,0,0,COUNTA([results_list.xls]Results!$Q:$Q),1)

The formula is simply:

=COUNTIFS(ResultsQ,"GENDER",ResultsM,"MALE"

However, this does NOT work. it returns the #VALUE! error. However, odly enough, when I use column references, it works:

=COUNTIFS([results_list.xls]Results!Q:Q, "GENDER", [results_list.xls]Results!M:M, "MALE")

This makes me think that COUNTIFS just don't work with named references..

View 8 Replies
View Related
Feb 22, 2008

I'm creating a coversheet that shows the percentage of "yes" and "no" answers from several cells in other sheets of the book. My problem is that I'm trying to use a countif statement to do it, and the cells i'm counting aren't in a simple range. ex. A1:A10

In stead i'm trying to get something like:

=COUNTIF((Sheet2!A2,Sheet2!A10,Sheet2!A15),"yes")

View 2 Replies
View Related
Dec 16, 2008

I want excel to count the number of items in a range that I have named "Name" and I have another range that I have name "date" which contains (obviously) dates. The dates are in order. I want to count the number of items in "name" that are associated with the date in the "Date" range.

The problem is I want to count the names in a date range, which is todays date through to 30 days after. I have to days date already posted automatically in K1 [by the formula =TODAY()]

Essentially, count all the times "Bob" appears in the Range "Names" that appear in the next 30 days. My Brain hurts just trying to describe it

View 9 Replies
View Related
Oct 7, 2006

I have cells containing data within C15:C22

I also have cells containing data within E25:E32

Some of these cells have the value '5' in them.

I want to have a running total of all the cells in these two ranges that have a value of '5' in them.

I did this formula:

=COUNTIF($C$15:$C$22,"=5")

This works okay but unfortunately this only covers the first data range. How do I specify the other data range in this formula?

View 5 Replies
View Related
Jul 2, 2009

My problem is :

1.In G Column I put logic for Fail and Obtained Marks.

G2=IF(COUNTIF(B2:F2,">=60")=5,SUM(B2:F2),"Fail")

2. Now in H column I want use this formula which I obtained from this forum

H2=SUMPRODUCT((G$2:G$7>G2)/COUNTIF(G$2:G$7,G$2:G$7&""))+1

To get the position of Students.

But the text value "fail" in the G2:G7 getting Position No. 1 and i've noticed the reason by using evaluate formula as well.

3. I got solution by changing "Fail" with 0 by creating column I and then column H put this formula ........

View 14 Replies
View Related
Nov 22, 2006

The following formula produces the desired result:

=COUNTIF(INDIRECT(TEXT(A8,"mmm")&"!B2:Z100"),"SK")

but replacing the range of cells with a dynamic named range returns #REF!:

=COUNTIF(INDIRECT(TEXT(A8,"mmm")&"!Data"),"SK")

where A8 is the date 01/01/07. I'm trying to count items within the range Jan!Data.

I'm not sure if I'm trying to do the impossible, or if I'm missing something.

View 9 Replies
View Related
Jul 6, 2009

I want to get students positions in a class like 1st, 2nd, 3rd, etc. There can be two 1st position and 2 2nd positions at a time .

1.In G Column I put logic for Fail and Obtained Marks.

G2=IF(COUNTIF(B2:F2,">=60")=5,SUM(B2:F2),"Fail")

2. Then i made array formula in column H to get the position

={SUMPRODUCT((IF(ISNUMBER($G$2:$G$7),$G$2:$G$7,0)>N(G2))/COUNTIF(G$2:G$7,G$2:G$7&""))+1}

Some improvement to write fail & position

={IF(COUNTIF(B3:F3,">=60")5,"Fail",SUMPRODUCT((IF(ISNUMBER($G$2:$G$7),$G$2:$G$7,0)>N(G3))/COUNTIF(G$2:G$7,G$2:G$7&""))+1)}

And more work to get total marks & position and Fail at the same time......

={IF(COUNTIF(B2:F2,">=60")5,"Fail",SUM(B2:F2)&"-"&SUMPRODUCT((IF(ISNUMBER($G$2:$G$7),$G$2:$G$7,0)>N(G2))/COUNTIF(G$2:G$7,G$2:G$7&""))+1)}

Now I wounder that is there a way to do all calculations in column H without using column G

By replacing (if there is any method) G2, G3, G4 etc. with Sum(B2:F2); Sum(B3:F3);Sum(B4:F4) etc. in below formula

={SUMPRODUCT((IF(ISNUMBER($G$2:$G$7),$G$2:$G$7,0)>N(G2))/COUNTIF(G$2:G$7,G$2:G$7&""))+1}.....................

View 9 Replies
View Related
May 8, 2012

I am using Excel 2010. I have a spreadsheet where column A is for Quarter, column B is for Employee, and columns C-R are for Codes (Code1; Code2; Code3; etc. through Code15). One line might have no values in the codes columns, another might have values in only Code1, another might have values in Code1 and Code2, and another might have values in all 15 columns.

A B C D E F --> R

1 Qtr Emp Code01 Code02 Code03 Code04 --> to Code15

2 2012.1 Liz CER02 INS12 WKH15

3 2012.2 Jim PIN55 WKH12 WKH19 WKH23

4 2012.2 Jon

5 2012.2 Jim WKH15 WKH23

6 2012.2 Jon PIN55 WKH15 WKH12 CER08

The worksheet is named "ALLAUDITS" and the named ranges are as follows:

Quarter: =offset(allaudits!$A$1,0,0,counta(allaudits!$A:$A),1)

Employee: =offset(allaudits!$B$1,0,0,counta(allaudits!$B:$B),1)

CodeData: =offset(allaudits!$C$1,0,0,counta(allaudits!$C:$C),15)

On another worksheet I need to be able to count how many times WKH15 appears in the CodeData range within a certain Quarter. I tried

=countifs(Quarter,"2012.2",CodeData,"WKH15")

But that didn't work, and from what I can tell in Excel support, it's because the ranges are different sizes. I have over 6500 rows, so I'm trying to avoid having to name all 15 columns and then do a sumproduct on all of them, such as

=sumproduct((Quarter="2012.2")*((Code1="WKH15")+(Code2="WKH15")+.......)))

Calculation would take forever.

I could just create a pivot table based on the "allaudits" worksheet, but I can't figure out how to get the actual codes as the row headers (instead of Code1, Code2, Code3, etc.).

View 3 Replies
View Related
Oct 11, 2008

I need to create formulas that reference a single date and output date ranges. The objective is to have a person input a Monday date in any given month and receive a four weeks out worth of dates and ranges. For example: In a lone cell, the person inputs 10/13/08. Automatically, the sheet produces the next full week range: October 19 – October 25 in a single cell and also produces a cell for each date. Example: Sunday 19, Monday 20, Tuesday 21, etc…. It should look like:

Monday Date:

10/13/08

October 19 – October 25

Sunday 19

Monday 20

Tuesday 21

Wednesday 22

Thursday 23

Friday 24

Saturday 25

and then repeat for three more weeks. I thought I had it figured out until the month changed. The dates continued in October instead of adding a month. This report will be ran weekly, so simply adding a +1MONTH to some cells will not benefit me as I’ll have to change the formula every week. I want the formula to compute the data without any manipulation over the next several years. The only change will be the Monday date.

View 2 Replies
View Related
Nov 8, 2012

I have been looking at a post number 170404 which NBVC answered with an example grid. This was while I was trying to bring searched data through to another sheet and this is just what I was looking for as a brilliant start,

I have attached my very similar example in my scenario. I have also got NBVC's example on the first two sheets of this as reference. In addition I am also bringing through from-to date ranges which I then need to be applied to a Booking Sheet so I can see that these dates are booked for this person, and ideally where they are going and what they need to do there by colour.

I tried, just as a test in this example the following. Please note that this only had the three ranges as I was testing an example coordinator which returned three date ranges. It could be that the example returns 20 or 30 ranges that need to be applied to the rather primative Booking Sheet.

=IF(OR(AND(C10>='Coordinators list'!F5,'Coordinators list'!L5<=C10),(AND(C10>='Coordinators list'!F6,'Coordinators list'!L6<=C10)),(AND(C10>='Coordinators list'!F7,'Coordinators list'!L7<=C10))),"yes","no")

It seemed to give the right answer initially but trying different dates it gave the wrong result. It seemed to be checking one of the ranges and not all of them. As mentioned above this was just an example to see what I could get working but I don't think that this would be the ideal way of doing this as it would need to check 30-40 maybe more ranges depending on what comes back from the coordinator search.

The aim would be to choose a co-ordinator on the Site Planner sheet and ideally return the city rather than the yes/no in the Booking Sheet for that date and use conditional formatting so that if the type from the Site Planner Sheet was paint it would fill in one colour, clean in another, etc.

Was hopefully trying to get this done without using any VB as I am trying to resolve this for my Wife she isn't very tech savvy and and I need to be able to explain the formulas!

I'm sure you will see from my sheet I have given this a good go but I am a bit unsure on what some of the formulas on NBVC sheet are doing, and that this is my first attempt at doing anything like this. I have also tried using lookup and match but I'm still having issues that they either aren't always in date order and it seems to return no if it doesn't match the first range. The other main issue that I have seen is that I need to check whatever ranges the selection comes back with rather than adding each one to search through.

I hope this becomes a bit clearer on the sheet I have attached,

View 9 Replies
View Related
Jan 5, 2012

I have a table with three columns. I'm building a calendar on a separate worksheet and am looking up the "value" based on a calendar date. So if a date falls within any of the ranges, I'd like to return the value in column C. For example, if the date is 02/07/12, I'd like for the result to be value 1, or if the date is 04/17/12, then I would like the result to be value 3. I've used a nested vlookup, but all that give me is the value when either the start or end dates match, but I can't get a value when the date falls within the range. If the dates were consecutive, I would simply use vlookup/TRUE, but the dates are not consecutive.

ABC102/06/1202/09/12value 1203/12/1203/15/12value 2304/16/1204/19/12value 3405/21/1205/24/12value 4506/25/1206/28/12value 5606/25/1206/28/12value 6

View 4 Replies
View Related
Aug 26, 2008

Ontvangstdatum21/08/2008AantalDatum@dagen oud22/08/200821/08/200825/08/200822/08/200825/08/200825/08/200825/08/200826/08/200825/08/200825/08/2008

In date: i have put a advanced filter with unique records. I would like to find a formula that counts howmany times that that date accurs in the first colom

I tried with a countif but you can't put a cell valume in it. i thougth something like this:

=countif(a:a;"=d") but ofcourse that doesn't work

View 9 Replies
View Related
Dec 8, 2006

I am trying to take a large spreadsheet with 2000+ rows of data each with its on unique date associated with each row (its a dump of invoices that need to get paid). I need to count how many invoices are each of the seperate 52 weeks of the last year using I believe a Countif function. My problem is I cannot seem to get the criteria written correctly. For example I want to count out of the 2000+ rows of data, how many invoice dates fall between say, Jan 1 and Jan 7. I would think it would be as easy as using the Countif function and then writing the criteria as a forumula to count invoices that have a date that is greater than or equal to Jan 1 BUT less than or equal to Jan 7. It is that precise formula that is giving me much frustration.

I have a similar Sumif forumula problem as I need to total the $ of the invoices but I think if I get the criteria to work for Countif it will work for Sumif.

View 6 Replies
View Related
Jul 23, 2014

I have a start date column and column for status. Status is either "in-progress" or "complete". I want to count the number of "complete" items that fall within a specific date range. I have tried countif but I can only seem to get a count of all items that fall between the date range. I do not want a pivot table for this.

View 3 Replies
View Related
Mar 27, 2014

I am trying to quantify the number of widgets in inventory that are useable.

Widgets are useable after 30 days from the date of purchase.

So far I have

C2=Purchase Date

=countif(C2:C5000, "="&today(C2)+30)

I am getting a value of 0 which is incorrect.

View 8 Replies
View Related
Jan 13, 2010

I have 2 columns, one containing a piece of data and one containing dates. I want to count how many times the data is in the first column, based on a specific date range in the 2nd column. I have attached a sample SSF with a better explanation inside it.

View 3 Replies
View Related
Sep 24, 2009

how can i use countif or sumproduct or sumif ..etc to calculate how many occurrence in a specify date and time .

View 10 Replies
View Related
Nov 9, 2011

I am trying to put together a formula to allow me to count the number of occurances dates within a month in a column.

So far I have tried

=COUNTIF(F4:F500,DATE(2011,10,9)) but it only lets me search for the 9th of October (when I want to count all dates specified in october.

Is there any other way I can search (count) a range for dates in October 2011 only?

View 2 Replies
View Related
Mar 6, 2012

I am trying to count the number of time the 15th and the 28th of the month show up in Column A. Column A is in date format but not all cells have a date. In this example I am only looking for the 15th but in the end I want the combined count of both.

This formula gives me a count of 1

=(COUNTIF(TimeSheets!A1:A119,"3/15/2012"))

These return 0

=(COUNTIF(TimeSheets!A1:A119,"*15*"))

=(COUNTIF(TimeSheets!A1:A119,"*/15/*"))

Or any other combination of wildcards with * or ?

Maybe there is something other than COUNTIF I can use.

DateThursday, March 01, 2012Friday, March 02, 2012Saturday, March 03, 2012Sunday, March 04, 2012Monday, March 05, 2012Tuesday, March 06, 2012Wednesday, March 07, 2012Thursday, March 08, 2012Friday, March 09, 2012Saturday, March 10, 2012Sunday, March 11, 2012Monday, March 12, 2012Tuesday, March 13, 2012Wednesday, March 14, 2012Thursday, March 15, 2012 Total Hours WorkedHours In This Pay Period

View 9 Replies
View Related
Apr 1, 2008

So I have my countif if past a certain date, which works fine:

=COUNTIF(J89:J128,">="&Sheet1!$A$2)

but what I need is this...

How do I count... but only if a date is past a certain range AND the cell next to it is nonblank?

View 9 Replies
View Related
Sep 11, 2003

I have a workbook which contains 1 spreadsheet that contains data entry for approximately 20 employees. The workbook then contains a separate sheet for each employee to display the detailed information

Column A stores the dates from Jan1 to Dec 31

Row 1 contains the employees names.

The data entered consists of approximatle 4 different 1-letter codes as to what transaction occurred that particular day.

What I would like to do now is be able to count the number of cells that contain a code for 2 different time periods. I would like for it to count 2 weeks ago and separately count 2 weeks in the future.

In trying to get this last calculation, I've added a column for WEEKNUM next to the date (column B) and used somethign along the lines of

=CountIF(C2:c366,Weeknum(Now()-2)) and also tried +2. Neither have worked.

View 9 Replies
View Related
Mar 1, 2007

I want to have a new macro/button to redo the chart cells based on the dates in cols T and U (abt 400 entries). T has the start date and U has the end date.

Row 9 - X9: CJ9 have dates for about 10 months (weekdays only)

Column J have either of these two values: A or B

Column C has either of these two values: C or blank

I would envisage it going through each row, checking:

If date at top of that col was between the dates in cols T & U

then

if col J = 'A' then set cell to black block

else if col J = 'B'

then

if col C = C (closed) then set cell to red block

else set cell to blue block

View 2 Replies
View Related