View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Toppers Toppers is offline
external usenet poster
 
Posts: 4,339
Default finding and summing data in somewhat complex matrix.

If you want it by unit ....

=SUMPRODUCT(($A$2:$A$6="Budget")*($B$2:$B$6=1)*($C $1:$F$1="Unit3")*
($C$2:$F$6))


"Willem" wrote:

Hi,

I am having trouble with the following, and wonder if someone can help me out.
We have a periodical dump of ledgerdata, which is divided in Budget and
Realisation info.
The format (i.e. the number of lines with Budget- or Realisation data)
varies per period.
Furthermore the data is specified (columnwise) over approx. 30 cust-units.
The data has to be reported per cost-unit on separate sheets, and is
ultimately aggregated to company-level.

The dataset looks like this:
Type Ledger# unit1 unit2 unit3 unitn
Budget 1 10 20 30 50
Budget 1 5 15 25 33
Budget 4 1 0 10 15
Real. 1 5 10 20 25
Real. 4 7 15 20 38
Real. 4 2 5 5 5

I am looking for a formula that finds whether it is a Budget or Realisation,
and then sums the values per ledger# per cost-unit.
Presently I find the data by defining the exact range (e.g. Budget data is
in A2:AZ136), and then use SUMIF to sum the data per ledger#.
With 30 cost-units this means a lot of find&replace.
Any suggestions?

Thanks!