ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Counting dates (https://www.excelbanter.com/excel-worksheet-functions/221757-counting-dates.html)

Boylie

Counting dates
 
I am trying to count the number of dates in a list that are between two other
dates.

I tried this but it just gave zero:
=COUNTIF(C11:C23,AND( ""& "G11","<"& "H11"))

Any advise?

Bernard Liengme

Counting dates
 
=COUNTIF(C11:C23,""&G11) - COUNTIF(C11:C23,"<"&H11)

or

SUMPRODUCT(--(C11:C23G11), --(C11:C23<H11) )

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Boylie" wrote in message
...
I am trying to count the number of dates in a list that are between two
other
dates.

I tried this but it just gave zero:
=COUNTIF(C11:C23,AND( ""& "G11","<"& "H11"))

Any advise?




Teethless mama

Counting dates
 
Nope, it doesn't work
=COUNTIF(C11:C23,""&G11) - COUNTIF(C11:C23,"<"&H11)


try like this:
=COUNTIF(C11:C23,""&G11) - COUNTIF(C11:C23,"="&H11)



"Bernard Liengme" wrote:

=COUNTIF(C11:C23,""&G11) - COUNTIF(C11:C23,"<"&H11)

or

SUMPRODUCT(--(C11:C23G11), --(C11:C23<H11) )

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Boylie" wrote in message
...
I am trying to count the number of dates in a list that are between two
other
dates.

I tried this but it just gave zero:
=COUNTIF(C11:C23,AND( ""& "G11","<"& "H11"))

Any advise?





Shane Devenshire[_2_]

Counting dates
 
Hi,

In 2007:

=COUNTIFS(C11:C23, ""& G11,C11:C23,"<"& H11)

or in all versions another variation of the SUMPRODUCT:

=SUMPRODUCT((C11:C23G11)*(C11:C23<H11))

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"Boylie" wrote:

I am trying to count the number of dates in a list that are between two other
dates.

I tried this but it just gave zero:
=COUNTIF(C11:C23,AND( ""& "G11","<"& "H11"))

Any advise?


Bernard Liengme

Counting dates
 
Yes, that was foolish of me!
Thanks
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Teethless mama" wrote in message
...
Nope, it doesn't work
=COUNTIF(C11:C23,""&G11) - COUNTIF(C11:C23,"<"&H11)


try like this:
=COUNTIF(C11:C23,""&G11) - COUNTIF(C11:C23,"="&H11)



"Bernard Liengme" wrote:

=COUNTIF(C11:C23,""&G11) - COUNTIF(C11:C23,"<"&H11)

or

SUMPRODUCT(--(C11:C23G11), --(C11:C23<H11) )

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Boylie" wrote in message
...
I am trying to count the number of dates in a list that are between two
other
dates.

I tried this but it just gave zero:
=COUNTIF(C11:C23,AND( ""& "G11","<"& "H11"))

Any advise?








All times are GMT +1. The time now is 01:24 AM.

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