View Single Post
  #5   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.

Did you see my earlier reply?

If this does not meet your requirements, can you show us the format of your
output?

"Willem" wrote:

Mike, thanks for your quick reply, but no, it did not help me.
Maybe I was not quite clear in my question, but I'll try again.
I want to sum data per cost-unit, if 2 criteria are met.
The data is organised in ranges, identified by the text "Realisation" or
"Budget" in column A (criterium 1). The next criterium is in column D, and
consists of a number.
There are multiple rows containing data matching both criteria, and these
data i want to total per cost-unit.
I tried nesting IF-statements, combined IF with SUMIF, tried VLOOKUP, but
tio no avail.
If I confine the range tot the part with only Realisation, it seems to work
well. The problem occurs when I expand the range to the full dataset; then I
get a total of al elements in the column I am evaluating.
Hope that this is the info you (or anybody else) helps to come up with the
correct solution.
Keeping my fingers crossed.....


"Mike H" wrote:

If ive understood correctly this could work:-

=SUMPRODUCT((A1:A10="Budget")*(B1:B10=1)*(C1:F10))


Alter the ranges to suit. This finds Budget in Col A, No1 in Col B and then
sums cols C,D,E & F

Mike

"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!