View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernard Liengme Bernard Liengme is offline
external usenet poster
 
Posts: 4,393
Default SUMPRODUCT Between Dates

Marcelo,
Double negation is used in SUMPRODUCT to convert FALSE/TRUE Boolean values
to numeric 0/1 values. Excel does this whenever an arithmetic operation is
performed on a Boolean. But you are also multiplying, so the double
negation is not needed. It is not wrong, just unnecessary.

Either of these will work
=SUMPRODUCT((D32:D101=DATE(2009,1,1))*(D32:D101<= DATE(2009,1,31)),
E32:E101)
=SUMPRODUCT(--(D32:D101=DATE(2009,1,1)), --(D32:D101<=DATE(2009,1,31)),
E32:E101)
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Marcelo" wrote in message
...
=SUMPRODUCT(--(D32:D101=DATE(2009,1,1))*--(D32:D101<=DATE(2009,1,31)),E32:E101)

ajust the range for your needs.
hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"JerryS" escreveu:

I'm looking for a formula that will add the total number of units in one
column that fall between dates of another column. Dates are shown as
01/01/2009 for example and I am looking to sum units between 01/01/2009
and
01/31/2009. Thanks
--
JerryS