Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 148
Default Subtotal - Based on DATE

Hi,

My formula below retunrs "0" because this year, I think "12" refers to
December 2008. The formula below was to produce December 2007.

Please edit the formula below so it can produce December 2007 and/or
December of ANY year that I will select in the future.

=SUMPRODUCT(--(TEXT('Processing'!$J$2:$J1995,"m")="12"),--('Processing'!$J$2:$J1995<""))

Thank you.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Subtotal - Based on DATE

12 refers to December in any year.

If you want December of 2007:

=SUMPRODUCT(--(TEXT('Processing'!$J$2:$J1995,"yyyymm")="200712") ,
--('Processing'!$J$2:$J1995<""))



Danny wrote:

Hi,

My formula below retunrs "0" because this year, I think "12" refers to
December 2008. The formula below was to produce December 2007.

Please edit the formula below so it can produce December 2007 and/or
December of ANY year that I will select in the future.

=SUMPRODUCT(--(TEXT('Processing'!$J$2:$J1995,"m")="12"),--('Processing'!$J$2:$J1995<""))

Thank you.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 148
Default Subtotal - Based on DATE

Thanks a lot Dave!

"Dave Peterson" wrote:

12 refers to December in any year.

If you want December of 2007:

=SUMPRODUCT(--(TEXT('Processing'!$J$2:$J1995,"yyyymm")="200712") ,
--('Processing'!$J$2:$J1995<""))



Danny wrote:

Hi,

My formula below retunrs "0" because this year, I think "12" refers to
December 2008. The formula below was to produce December 2007.

Please edit the formula below so it can produce December 2007 and/or
December of ANY year that I will select in the future.

=SUMPRODUCT(--(TEXT('Processing'!$J$2:$J1995,"m")="12"),--('Processing'!$J$2:$J1995<""))

Thank you.


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default Subtotal - Based on DATE

try this idea where a1 has 2007 and b1 has 12 or replace =b1 with =12.
Assumes DATES in col A and values to sum in col B

=sumproduct((year(a2:a22)=a1)*(month(a2:a22)=b1)*b 2:b22)

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Danny" wrote in message
...
Hi,

My formula below retunrs "0" because this year, I think "12" refers to
December 2008. The formula below was to produce December 2007.

Please edit the formula below so it can produce December 2007 and/or
December of ANY year that I will select in the future.

=SUMPRODUCT(--(TEXT('Processing'!$J$2:$J1995,"m")="12"),--('Processing'!$J$2:$J1995<""))

Thank you.


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 148
Default Subtotal - Based on DATE

Thanks for the tip Don. I'll try it sometime.

"Don Guillett" wrote:

try this idea where a1 has 2007 and b1 has 12 or replace =b1 with =12.
Assumes DATES in col A and values to sum in col B

=sumproduct((year(a2:a22)=a1)*(month(a2:a22)=b1)*b 2:b22)

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Danny" wrote in message
...
Hi,

My formula below retunrs "0" because this year, I think "12" refers to
December 2008. The formula below was to produce December 2007.

Please edit the formula below so it can produce December 2007 and/or
December of ANY year that I will select in the future.

=SUMPRODUCT(--(TEXT('Processing'!$J$2:$J1995,"m")="12"),--('Processing'!$J$2:$J1995<""))

Thank you.





Reply
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
Unhide column based on subtotal level open. Gilbert Excel Discussion (Misc queries) 0 September 17th 07 08:00 PM
Subtotal based discounts C01d Excel Discussion (Misc queries) 1 June 4th 06 05:35 PM
How to calculate shipping costs based on subtotal mywaters Excel Worksheet Functions 3 May 9th 06 03:31 PM
subtotal based on two conditions ashish128 Excel Discussion (Misc queries) 5 April 28th 06 05:14 PM
I need to subtotal based on an if Sandy Excel Worksheet Functions 6 March 7th 06 05:25 PM


All times are GMT +1. The time now is 05:00 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"