Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
CC
 
Posts: n/a
Default sumproduct with more than one date

Hi,

I used the formulae below to generate a total and a count based on two
criteria, a date and a category:

For a count:
=sumproduct(--(b2:b657=date(2006,4,20)),--(f2:f657="d"))
To sum column G when those conditions are met:
=sumproduct(--(b2:b657=date(2006,4,20)),--(f2:f657="d"),g2:g657)


I now need to sum and count from more than one date (e.g. the
cumulative total of houses for sale on 20/04/2006 AND 27/04/2006 and
the total value of them). I have tried simply adding the second date to

the sumproduct formulae above using *, OR, but that didn't work. Any
suggestions?


CC

  #3   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default sumproduct with more than one date

=SUMPRODUCT(--((B2:B657=DATE(2006,4,20))+(B2:B657=DATE(2006,4,27 ))),--(F2:F6
57="d"),G2:G657)


--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"CC" wrote in message
ups.com...
Hi,

I used the formulae below to generate a total and a count based on two
criteria, a date and a category:

For a count:
=sumproduct(--(b2:b657=date(2006,4,20)),--(f2:f657="d"))
To sum column G when those conditions are met:
=sumproduct(--(b2:b657=date(2006,4,20)),--(f2:f657="d"),g2:g657)


I now need to sum and count from more than one date (e.g. the
cumulative total of houses for sale on 20/04/2006 AND 27/04/2006 and
the total value of them). I have tried simply adding the second date to

the sumproduct formulae above using *, OR, but that didn't work. Any
suggestions?


CC



  #4   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default sumproduct with more than one date

Hi

Just add another SUMPRODUCT with the other date:
For a count:
=sumproduct(--(b2:b657=date(2006,4,20)),--(f2:f657="d")) +
sumproduct(--(b2:b657=date(2006,4,27)),--(f2:f657="d"))
To sum column G when those conditions are met:
=sumproduct(--(b2:b657=date(2006,4,20)),--(f2:f657="d"),g2:g657) +
=sumproduct(--(b2:b657=date(2006,4,27)),--(f2:f657="d"),g2:g657)

Hope this helps.
Andy.


"CC" wrote in message
ups.com...
Hi,

I used the formulae below to generate a total and a count based on two
criteria, a date and a category:

For a count:
=sumproduct(--(b2:b657=date(2006,4,20)),--(f2:f657="d"))
To sum column G when those conditions are met:
=sumproduct(--(b2:b657=date(2006,4,20)),--(f2:f657="d"),g2:g657)


I now need to sum and count from more than one date (e.g. the
cumulative total of houses for sale on 20/04/2006 AND 27/04/2006 and
the total value of them). I have tried simply adding the second date to

the sumproduct formulae above using *, OR, but that didn't work. Any
suggestions?


CC



  #5   Report Post  
Posted to microsoft.public.excel.misc
CC
 
Posts: n/a
Default sumproduct with more than one date

Hi,

Papou - didn't work but thanks anyway (I'd tried that already).

Bob - didn't work but looks like it should

....and the prize goes to *drum roll* ... Andy!

Works fine, simple really!

Thanks again for the advice.

CC



  #6   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default sumproduct with more than one date

Worked for me.

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"CC" wrote in message
ups.com...
Hi,

Papou - didn't work but thanks anyway (I'd tried that already).

Bob - didn't work but looks like it should

...and the prize goes to *drum roll* ... Andy!

Works fine, simple really!

Thanks again for the advice.

CC



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 by date heater Excel Discussion (Misc queries) 4 March 22nd 06 08:10 PM
average value from a table TUNGANA KURMA RAJU Excel Discussion (Misc queries) 15 March 21st 06 06:52 AM
How do I calculate if a date is in a certain time frame? Pe66les Excel Worksheet Functions 19 August 27th 05 11:07 PM
Sumproduct with Date column JerryS Excel Worksheet Functions 2 June 6th 05 11:45 PM
Using sumproduct to count number by date JerryS Excel Worksheet Functions 2 June 6th 05 10:37 PM


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