View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
duane[_77_] duane[_77_] is offline
external usenet poster
 
Posts: 1
Default Macro for adding between dates


let's say the start date is in cell a1, and the end date in cell a2, and
you want to sum data in column C rows 1:100 between these dates in
column B(inclusive of start and end dates).

=sumproduct((b1:b100=a1)*(b1+b100<=a2)*(c1:c100))

to sum data in columns c:e

=sumproduct((b1:b100=a1)*(b1+b100<=a2)*(c1:e100))


--
duane


------------------------------------------------------------------------
duane's Profile: http://www.excelforum.com/member.php...o&userid=11624
View this thread: http://www.excelforum.com/showthread...hreadid=561737