View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
tkraju via OfficeKB.com tkraju via OfficeKB.com is offline
external usenet poster
 
Posts: 109
Default Code for summary report

Thanks,this sumproduct function worked very well.

wrote:
Thanks,but Â*I don't like Pivot Table.

[quoted text clipped - 24 lines]

- Show quoted text -


tkraju,

Try using the SUMPRODUCT function. I placed your data into a
spreadsheet as follows: Names in Column A, starting in A1; Dates in
Column B, starting in B1; and Dollar Values in Column C, starting in
C1. I then placed a hard-coded date in D1 (i.e. 4/1/09) and a formula
in D2 (i.e. =EOMONTH(D1, 0)). I then insert the following data into
the respective cells: Mary, John, and Bill in cells D2, D3, and D4.
Lastly, I placed the following formula in cell E2 and copied it down:
=SUMPRODUCT(($A$1:$A$8=D2)*($B$1:$B$8<=$E$1)*($B$ 1:$B$8=$D$1)*($C$1:$C
$8)).

A1:A8 refers to the Names
B1:B8 refers to the Dates
C1:C8 refers to the Values
D1 refers to the first day of the month
E1 refers to the last day of the month

You can create named ranges for the Names, Dates, and Values instead
of referencing the cells, if you so desire. Whenever new data is
added, simply change the Refers To for each range. The formula will
work only if the Names, Dates, and Values arrays are the same size.

Best,

Matt


--
Message posted via
http://www.officekb.com