ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Countin Dates (https://www.excelbanter.com/excel-worksheet-functions/25100-countin-dates.html)

Steve J

Countin Dates
 
Hi

I have a colum which contains dates in format mmm-yy format
In the first row, I would like to count the number of instances where the
month and year is equal to the current month and year.

Is this possible please?

Tks
S



Nick


Steve

Enter this as an array formula (Ctrl+Shift+Enter)

=SUM(IF(MONTH(B5:B34)=MONTH(NOW()),IF(YEAR(B5:B34) =YEAR(NOW()),1,0),0))

dates in range B5:B34
This formula will count the number of dates that have the same month and
year as today.

Hope this helps.
nick

"Steve J" wrote in message
...
Hi

I have a colum which contains dates in format mmm-yy format
In the first row, I would like to count the number of instances where the
month and year is equal to the current month and year.

Is this possible please?

Tks
S





Bob Phillips



--
HTH

Bob Phillips

"Steve J" wrote in message
...
Hi

I have a colum which contains dates in format mmm-yy format
In the first row, I would like to count the number of instances where the
month and year is equal to the current month and year.

Is this possible please?

Tks
S





Bob Phillips

=SUMPRODUCT(--(TEXT(A1:A20,"yymm")=TEXT(TODAY(),"yymm")))

--
HTH

Bob Phillips

"Steve J" wrote in message
...
Hi

I have a colum which contains dates in format mmm-yy format
In the first row, I would like to count the number of instances where the
month and year is equal to the current month and year.

Is this possible please?

Tks
S





Daniel.M

Hi Steve,

Just another one,

=SUMPRODUCT(--(A1:A20-DAY(A1:A20)=TODAY()-DAY(TODAY())))

Regards,

Daniel M.

"Steve J" wrote in message
...
Hi

I have a colum which contains dates in format mmm-yy format
In the first row, I would like to count the number of instances where the
month and year is equal to the current month and year.

Is this possible please?

Tks
S






All times are GMT +1. The time now is 09:36 AM.

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