COUNTIFS with a date for criteria...

L

LUSN

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?
 
F

Fred Smith

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top