View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Joe User[_2_] Joe User[_2_] is offline
external usenet poster
 
Posts: 905
Default adding/omitting/all the values prior to todays date

"tleehh" wrote:
using given formula by Otavio
sum((B10:B20="s1")*(C10:C20<"x")*A10:A20),
how can it add all the values in colume A that is
prior to todays date (dates are in colume D).


=SUMPRODUCT((B10:B20="s1")*(C10:C20<"x")*(D10:D20 <TODAY()), A10:A20)

Or do you mean simply:

=SUMPRODUCT(--(D10:D20<TODAY()), A10:A20)

or alternatively:

=SUMIF(D10:D20, "<" & TODAY(), A10:A20)