![]() |
SUMPRODUCT - Count Previous Month
=SUMPRODUCT((INPUT!$B$2:$B$20000 = A2)*(INPUT!$A$2:$A$20000 =
MONTH(NOW()) -1)) I would like to count the number of records from the previous month regardless of what month it is. So if I run this in October, it will check column A, and give me a count of all the records for September. I don't think I am doing this correct. |
SUMPRODUCT - Count Previous Month
try
=sumproduct(--(month(INPUT!$a$2:$a$20000)=(month(now())-1)*(INPUT!$B$2:$B$20000 = A2) hth -- regards from Brazil Thanks in advance for your feedback. Marcelo "HearSay" escreveu: =SUMPRODUCT((INPUT!$B$2:$B$20000 = A2)*(INPUT!$A$2:$A$20000 = MONTH(NOW()) -1)) I would like to count the number of records from the previous month regardless of what month it is. So if I run this in October, it will check column A, and give me a count of all the records for September. I don't think I am doing this correct. |
SUMPRODUCT - Count Previous Month
I get the #VALUE! value in that cell.
"Marcelo" wrote in message ... try =sumproduct(--(month(INPUT!$a$2:$a$20000)=(month(now())-1)*(INPUT!$B$2:$B$20000 = A2) hth -- regards from Brazil Thanks in advance for your feedback. Marcelo "HearSay" escreveu: =SUMPRODUCT((INPUT!$B$2:$B$20000 = A2)*(INPUT!$A$2:$A$20000 = MONTH(NOW()) -1)) I would like to count the number of records from the previous month regardless of what month it is. So if I run this in October, it will check column A, and give me a count of all the records for September. I don't think I am doing this correct. |
SUMPRODUCT - Count Previous Month
How about:
=SUMPRODUCT(--(Input!$B$2:$B$20000=A2), --(TEXT(Input!$A$2:$A$20000,"yyyymm") =TEXT(TODAY()-DAY(TODAY()),"yyyymm"))) =today()-day(today()) gives the last day of the previous month 9/29/2006 - 29 = Sept 0th, 2006, which is Aug 31, 2006. And the formatting will ignore the days and just look at the month/year. HearSay wrote: =SUMPRODUCT((INPUT!$B$2:$B$20000 = A2)*(INPUT!$A$2:$A$20000 = MONTH(NOW()) -1)) I would like to count the number of records from the previous month regardless of what month it is. So if I run this in October, it will check column A, and give me a count of all the records for September. I don't think I am doing this correct. -- Dave Peterson |
All times are GMT +1. The time now is 12:33 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com