Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
Lee Lee is offline
external usenet poster
 
Posts: 38
Default Sumproduct and dates

=SUMPRODUCT(--(SPRING4!N2:N1549<="1/31/07"),(SPRING4!M2:M1549))
Above is my formula that I can't get to work with dates. I want to sum the
M2:M1549 based on the date column of N. What am I doing that is wrong? The
date column is formated as mm/dd/yy.
Thanks to all for any help.
--
Lee


  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 3,268
Default Sumproduct and dates

There is no need for the extra parenthesis

=SUMPRODUCT(--(SPRING4!N2:N1549<=--"1/31/07"),SPRING4!M2:M1549)

however you were looking for the text string 1/31/07, the unary minuses will
take care of that although it might be better to use either

=SUMPRODUCT(--(SPRING4!N2:N1549<=DATE(2007,1,31)),SPRING4!M2:M15 49)

or


=SUMPRODUCT(--(SPRING4!N2:N1549<=H2),SPRING4!M2:M1549)

where you would put the date in a cell (H2 in my example)


--
Regards,

Peo Sjoblom



"Lee" wrote in message
...
=SUMPRODUCT(--(SPRING4!N2:N1549<="1/31/07"),(SPRING4!M2:M1549))
Above is my formula that I can't get to work with dates. I want to sum the
M2:M1549 based on the date column of N. What am I doing that is wrong?
The date column is formated as mm/dd/yy.
Thanks to all for any help.
--
Lee



  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 837
Default Sumproduct and dates

Excel dates are not text, they are the number of days since 1900. Try
DATEVALUE("1/31/07")
instead of "1/31/07"

Jerry

"Lee" wrote:

=SUMPRODUCT(--(SPRING4!N2:N1549<="1/31/07"),(SPRING4!M2:M1549))
Above is my formula that I can't get to work with dates. I want to sum the
M2:M1549 based on the date column of N. What am I doing that is wrong? The
date column is formated as mm/dd/yy.
Thanks to all for any help.
--
Lee



  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 10,593
Default Sumproduct and dates

Never use an ambiguous date format like that. It will fail if used elsewhere
in the world. Whether you use DateValue or coerce with --.

Use an unambiguous date forma, 2007-01-31, or use Date(2007,1,31).



--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Jerry W. Lewis" wrote in message
...
Excel dates are not text, they are the number of days since 1900. Try
DATEVALUE("1/31/07")
instead of "1/31/07"

Jerry

"Lee" wrote:

=SUMPRODUCT(--(SPRING4!N2:N1549<="1/31/07"),(SPRING4!M2:M1549))
Above is my formula that I can't get to work with dates. I want to sum
the
M2:M1549 based on the date column of N. What am I doing that is wrong?
The
date column is formated as mm/dd/yy.
Thanks to all for any help.
--
Lee





  #5   Report Post  
Posted to microsoft.public.excel.newusers
Lee Lee is offline
external usenet poster
 
Posts: 38
Default Sumproduct and dates

Thanks to all for getting back so quickly and it works!
Lee
"Lee" wrote in message
...
=SUMPRODUCT(--(SPRING4!N2:N1549<="1/31/07"),(SPRING4!M2:M1549))
Above is my formula that I can't get to work with dates. I want to sum the
M2:M1549 based on the date column of N. What am I doing that is wrong?
The date column is formated as mm/dd/yy.
Thanks to all for any help.
--
Lee





  #6   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 287
Default Sumproduct and dates

Don't really need SUMPRODUCT here, SUMIF will suffice

=SUMIF(SPRING4!N2:N1549,"<="&DATE(2007,1,31),SPRIN G4!M2:M1549)

"Lee" wrote:

Thanks to all for getting back so quickly and it works!
Lee
"Lee" wrote in message
...
=SUMPRODUCT(--(SPRING4!N2:N1549<="1/31/07"),(SPRING4!M2:M1549))
Above is my formula that I can't get to work with dates. I want to sum the
M2:M1549 based on the date column of N. What am I doing that is wrong?
The date column is formated as mm/dd/yy.
Thanks to all for any help.
--
Lee




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
SUMPRODUCT and Dates Joe Gieder Excel Worksheet Functions 2 June 6th 07 05:21 PM
sumproduct between dates Johnny M Excel Worksheet Functions 3 March 6th 07 07:10 PM
sumproduct with dates Bumblebee Excel Worksheet Functions 2 August 22nd 06 08:16 PM
SUMPRODUCT ON DATES RagDyeR Excel Worksheet Functions 3 January 13th 05 04:21 PM
sumproduct between dates Dominique Feteau Excel Worksheet Functions 8 December 5th 04 09:56 PM


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