View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
bpeltzer bpeltzer is offline
external usenet poster
 
Posts: 180
Default nesting "and" in sumproduct function

To get expression1 AND expression2 in Excel, you'd use
=AND(expression1,expression2).
If you're doing this within a sumproduct, however, you could just treat each
as a separate condition...
=sumproduct(--(date_range=c1),--(date_range<=d1),value_range) will add all
the values corresponding to dates in the range [c1,d1].


"George P" wrote:

I need to nest a date range argument in a sumproduct function but can't seem
to get it to work. When I only write "...<=c1)" within the string, it works
for any data less than or equal to the cell's date, but I need to say
"...=x-date AND <=y-date...".

I'm sure its staring me in the face but...

Thanks for your help out there.

George