LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default 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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I extract name of the LONG MONTH from previous cell. amit Excel Worksheet Functions 2 August 18th 06 01:39 PM
Count Mondays worked in Month harnagel Excel Worksheet Functions 2 December 8th 05 03:12 PM
Match Last Occurrence of Numeric Value and Count BACK to Previous Sam via OfficeKB.com Excel Worksheet Functions 4 November 24th 05 02:15 AM
How to count the number of times something occurs within a certain month Joyce Excel Worksheet Functions 2 October 18th 05 08:38 PM
automatically update chart plotting current month and previous 6 Jane Charts and Charting in Excel 1 September 1st 05 10:19 PM


All times are GMT +1. The time now is 09:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"