ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   COUNTIFS with a date for criteria... (https://www.excelbanter.com/excel-worksheet-functions/257912-countifs-date-criteria.html)

LUSN

COUNTIFS with a date for criteria...
 
I want to count all the entries in column N that occurred between a range of
dates specified in the other criteria. The dates are obviously in column B.

I use this currently-
COUNTIFS(Data!N:N,"=Option",Data!B:B,"=1/1/2009",Data!B:B,"<=2/28/2009")

However, I use this similar function in multiple cells, all counting
different attributes. Rather than going into each cell and changing the
search dates, I wanted a criteria to be a variable that can be entered into a
different set of cells... like this.

COUNTIFS(Data!N:N,"=Option",Data!B:B,"=A4",Data!B :B,"<=2/28/2009")

With A4 being a cell in which to enter the date. However, it doesn't work! I
get zero as a result every time. Is there a particular format i need to use
to indicate a date?



Fred Smith[_4_]

COUNTIFS with a date for criteria...
 
Do your dates and comparisons this way:
COUNTIFS(Data!N:N,"=Option",Data!B:B,"="&A4,Data! B:B,"<="&DATE(2009,2,28))

Regards,
Fred

"LUSN" wrote in message
...
I want to count all the entries in column N that occurred between a range
of
dates specified in the other criteria. The dates are obviously in column
B.

I use this currently-
COUNTIFS(Data!N:N,"=Option",Data!B:B,"=1/1/2009",Data!B:B,"<=2/28/2009")

However, I use this similar function in multiple cells, all counting
different attributes. Rather than going into each cell and changing the
search dates, I wanted a criteria to be a variable that can be entered
into a
different set of cells... like this.

COUNTIFS(Data!N:N,"=Option",Data!B:B,"=A4",Data!B :B,"<=2/28/2009")

With A4 being a cell in which to enter the date. However, it doesn't work!
I
get zero as a result every time. Is there a particular format i need to
use
to indicate a date?





All times are GMT +1. The time now is 03:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com