Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 21
Default adding next years value

i would like to add all the values in month of january of 2010 in colume D.
i am using formula as follows but does not add.

=sumproduct(d10:d100,--(month(b10:b100)=month(now())+2,--(year(b10:b100)=
year(now())+1))

colume B contains a dates and colume D cotains value.

Thank you.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default adding next years value

Are you really asking to sum the values for dates two months from now?

So on Jan 13, I'd want March -- of the same year?

if yes:

=sumproduct(d10:d100,
--(text(b1:b10,"yyyymm")
=text(date(year(today()),month(today())+2,1),"yyyy mm")))



tleehh wrote:

i would like to add all the values in month of january of 2010 in colume D.
i am using formula as follows but does not add.

=sumproduct(d10:d100,--(month(b10:b100)=month(now())+2,--(year(b10:b100)=
year(now())+1))

colume B contains a dates and colume D cotains value.

Thank you.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 21
Default adding next years value



"Dave Peterson" wrote:

Are you really asking to sum the values for dates two months from now?

So on Jan 13, I'd want March -- of the same year?

if yes:

=sumproduct(d10:d100,
--(text(b1:b10,"yyyymm")
=text(date(year(today()),month(today())+2,1),"yyyy mm")))



tleehh wrote:

i would like to add all the values in month of january of 2010 in colume D.
i am using formula as follows but does not add.

=sumproduct(d10:d100,--(month(b10:b100)=month(now())+2,--(year(b10:b100)=
year(now())+1))

colume B contains a dates and colume D cotains value.

Thank you.


--

Dave Peterson
.
Thank you!

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default adding next years value

2 problems.
Firstly your parentheses don't match. You forgot the closing parenthesis
after the figure 2.
Secondly if MONTH(NOW()) is 11, you are looking for MONTH(B10:B100) being
13. We don't usually get 13 months in a year. :-)
You can resolve the second problem by using MOD(...,12)
=SUMPRODUCT(D10:D100,--(MONTH(B10:B100)=MOD(MONTH(NOW())+2,12)),--(YEAR(B10:B100)=YEAR(NOW())+1))But also see Dave Peterson's question as to whether in Jan 2010 you'd wantMar 2010, or Mar 2011 which your current formula would be looking for.--David Biddulph"tleehh" wrote in ...i would like to add all the values in month of january of 2010 in colume D. i am using formula as follows but does not add. =sumproduct(d10:d100,--(month(b10:b100)=month(now())+2,--(year(b10:b100)= year(now())+1)) colume B contains a dates and colume D cotains value. 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
Adding 10 years to a date Jason K[_2_] Excel Discussion (Misc queries) 3 June 24th 09 07:37 PM
Adding 40 years to date Jaydeebug Excel Discussion (Misc queries) 3 August 9th 08 05:00 AM
Adding years to a date sumitk Excel Discussion (Misc queries) 4 May 18th 06 09:12 PM
Adding values for selected years OSDavidL Excel Worksheet Functions 6 February 9th 06 09:55 AM
Excel Adding years or months to a date Joan Excel Discussion (Misc queries) 2 April 25th 05 08:09 PM


All times are GMT +1. The time now is 05:02 AM.

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"