Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Count dates for previous month
Hoping someone can help, I'm about to lose my mind. I've tried every
combination of sum, if, countif, sumproduct, you name it and I can't figure it out. I've got a column of dates. What I want to do is count the number of dates that occurred last month, taking into consideration that a year change could be between the current month and last month. This was my latest attempt, but again it didn't work: =SUM(IF(MONTH(C2:C8)=MONTH(TODAY()-DAY(TODAY())),1,0)) If you can save what's left of my sanity, please help. Cheers, Scrib |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Count dates for previous month
Try...
=SUMPRODUCT(--(C2:C8-DAY(C2:C8)+1=DATE(YEAR(TODAY()),MONTH(TODAY())-1,1)) ) Hope this helps! In article . com, wrote: Hoping someone can help, I'm about to lose my mind. I've tried every combination of sum, if, countif, sumproduct, you name it and I can't figure it out. I've got a column of dates. What I want to do is count the number of dates that occurred last month, taking into consideration that a year change could be between the current month and last month. This was my latest attempt, but again it didn't work: =SUM(IF(MONTH(C2:C8)=MONTH(TODAY()-DAY(TODAY())),1,0)) If you can save what's left of my sanity, please help. Cheers, Scrib |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Count dates for previous month
Thank you very much, Domenic! That did the trick.
|
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Count dates for previous month
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Simple Way to Count the Number of Duplicate Dates on Multiple Worksheets | Excel Discussion (Misc queries) | |||
Calculating revenue per month by aggregating dates | Excel Worksheet Functions | |||
COUNT IF BETWEEN DATES | Excel Worksheet Functions | |||
How do I count cells in a column of dates between date ranges? | Excel Worksheet Functions | |||
Count occurences between dates | Excel Worksheet Functions |