#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Sumproduct

I can't seem to make SUMPRODUCT work with a date field as a criteria.

SUMPRODUCT(range="x")*(range="9/1/07")
I would like for the date range to look for "*/5/*" ie. amy month, any year.
If I change the range and look for words in that range it works. I just
can't seem to get it to work with a date.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Sumproduct

Try this:

=SUMPRODUCT((range="x")*(MONTH(range)=5))

Don't forget the parentheses!!

Assumes dates are in Excel date format.

Hope this helps.

Pete

On Oct 9, 12:14 am, Coley wrote:
I can't seem to make SUMPRODUCT work with a date field as a criteria.

SUMPRODUCT(range="x")*(range="9/1/07")
I would like for the date range to look for "*/5/*" ie. amy month, any year.
If I change the range and look for words in that range it works. I just
can't seem to get it to work with a date.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Sumproduct

.. date range to look for "*/5/*" ie. any month, any year

One way is to use TEXT on the dates col

With real dates assumed in col B,
you could try something like this in say, C2:
=SUMPRODUCT((A2:A100="x")*(TEXT(B2:B100,"d")="5"))
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Coley" wrote:
I can't seem to make SUMPRODUCT work with a date field as a criteria.

SUMPRODUCT(range="x")*(range="9/1/07")
I would like for the date range to look for "*/5/*" ie. amy month, any year.
If I change the range and look for words in that range it works. I just
can't seem to get it to work with a date.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 287
Default Sumproduct

or just

=SUMPRODUCT((A2:A100="x")*(DAY(B2:B100)=5))

"Max" wrote:

.. date range to look for "*/5/*" ie. any month, any year


One way is to use TEXT on the dates col

With real dates assumed in col B,
you could try something like this in say, C2:
=SUMPRODUCT((A2:A100="x")*(TEXT(B2:B100,"d")="5"))
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Coley" wrote:
I can't seem to make SUMPRODUCT work with a date field as a criteria.

SUMPRODUCT(range="x")*(range="9/1/07")
I would like for the date range to look for "*/5/*" ie. amy month, any year.
If I change the range and look for words in that range it works. I just
can't seem to get it to work with a date.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Sumproduct

Sorry, I mis-read what you wanted, as in the UK the middle part of the
date is the month. If you want the fifth day then change MONTH to DAY
in my formula.

Pete


I can't seem to make SUMPRODUCT work with a date field as a criteria.


SUMPRODUCT(range="x")*(range="9/1/07")
I would like for the date range to look for "*/5/*" ie. amy month, any year.
If I change the range and look for words in that range it works. I just
can't seem to get it to work with a date.- Hide quoted text -


- Show quoted text -



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? sumif(sumproduct)? David Excel Worksheet Functions 3 July 13th 07 07:06 PM
SUMPRODUCT? Joey041 Excel Worksheet Functions 2 November 20th 06 11:35 PM
using -- with SUMPRODUCT Dave F Excel Discussion (Misc queries) 13 November 15th 06 05:50 PM
Sumproduct Denise Excel Discussion (Misc queries) 4 October 20th 05 02:09 AM
Help with SUMPRODUCT FrankTimJr Excel Discussion (Misc queries) 4 October 12th 05 04:27 PM


All times are GMT +1. The time now is 08:27 PM.

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

About Us

"It's about Microsoft Excel"