Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Darren Hill
 
Posts: n/a
Default Sumproduct + Array Function?


I need a tricky function that I think needs to be entered as a Sumproduct
Array Function.

I have numerical data in a table A1:K11 (B2:K11 contains the data; A2:A11
= Row labels, B1:K1 = Column Labels)
What I need to do is, given an input column (B to K) and an output column
(B to K), perform the following calculation:
For each cell in input column
multiply by the sum of all cells below that cell's row in the output column
And add the final results.

So, for example, assume input column B and output column C, here's the
steps I'd need to do:
B2 * sum (C3:c11) +
B3 * sum (C4:c11) +
B4 * sum (C5:c11) +
B5 * sum (C6:c11) +
B6 * sum (C7:c11) +
B7 * sum (C8:c11) +
B8 * sum (C9:c11) +
B9 * sum (C10:c11) +
B10 * sum (C11:c11)

Notice how the number of cells in the sum drops by 1 as you step through
the input column's rows.
In case it matters, the data in each column adds up to 1; the value in
each cell is always greater than zero and less than 1.

Is this possible?

Thanks in advance
  #2   Report Post  
Harlan Grove
 
Posts: n/a
Default

Darren Hill wrote...
....
So, for example, assume input column B and output column C, here's the
steps I'd need to do:
B2 * sum (C3:c11) +
B3 * sum (C4:c11) +
B4 * sum (C5:c11) +
B5 * sum (C6:c11) +
B6 * sum (C7:c11) +
B7 * sum (C8:c11) +
B8 * sum (C9:c11) +
B9 * sum (C10:c11) +
B10 * sum (C11:c11)

....

Use the array formula

=SUM(B2:B10*MMULT(--(ROW(C3:C11)<=TRANSPOSE(ROW(C3:C11))),C3:C11))

  #3   Report Post  
Domenic
 
Posts: n/a
Default

Nice one Harlan! I was going to offer the following...

=SUMPRODUCT(B2:B10,SUBTOTAL(9,OFFSET(C3:C11,ROW(C3 :C11)-ROW(C3),0,ROWS(C3
:C11)-(ROW(C3:C11)-ROW(C3)))))

....confirmed with just ENTER, but I prefer your formula. I'll have to
take a closer look at it so that I can understand it.

In article .com,
"Harlan Grove" wrote:

Darren Hill wrote...
...
So, for example, assume input column B and output column C, here's the
steps I'd need to do:
B2 * sum (C3:c11) +
B3 * sum (C4:c11) +
B4 * sum (C5:c11) +
B5 * sum (C6:c11) +
B6 * sum (C7:c11) +
B7 * sum (C8:c11) +
B8 * sum (C9:c11) +
B9 * sum (C10:c11) +
B10 * sum (C11:c11)

...

Use the array formula

=SUM(B2:B10*MMULT(--(ROW(C3:C11)<=TRANSPOSE(ROW(C3:C11))),C3:C11))

  #4   Report Post  
Darren Hill
 
Posts: n/a
Default

On Thu, 08 Sep 2005 00:14:52 +0100, Harlan Grove wrote:

Use the array formula
=SUM(B2:B10*MMULT(--(ROW(C3:C11)<=TRANSPOSE(ROW(C3:C11))),C3:C11))


Thank you very much :)
------------------
Darren
  #5   Report Post  
Darren Hill
 
Posts: n/a
Default

On Thu, 08 Sep 2005 00:34:32 +0100, Domenic wrote:

Nice one Harlan! I was going to offer the following...

=SUMPRODUCT(B2:B10,SUBTOTAL(9,OFFSET(C3:C11,ROW(C3 :C11)-ROW(C3),0,ROWS(C3
:C11)-(ROW(C3:C11)-ROW(C3)))))

...confirmed with just ENTER, but I prefer your formula. I'll have to
take a closer look at it so that I can understand it.


I'm doing that, too.
I've saved your formula for study too. Thanks.

Darren
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel option to store trendline's coefficients in cells for use Miguel Saldana Charts and Charting in Excel 9 June 20th 05 08:45 PM
help please - trouble with sumproduct function Jennie Excel Worksheet Functions 2 June 17th 05 09:40 PM
Help with an array function malik641 New Users to Excel 4 June 10th 05 05:09 PM
sumproduct function Andreea Moyes via OfficeKB.com Excel Worksheet Functions 3 February 24th 05 09:00 AM
Vlookups array function by Alan Beban falvey3 Excel Worksheet Functions 1 February 17th 05 01:21 PM


All times are GMT +1. The time now is 08:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"