Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
AS AS is offline
external usenet poster
 
Posts: 5
Default Weighted Average across worksheets

I am aware of the technique using sumproduct to calculate a weighted average
figure, but this doesn't appear to work across worksheets.
I have 12 worksheets named P1 - P12 and am trying to calculate a weighted
average of the cells K2 and L2 on each sheet
The formula =SUMPRODUCT('P1:P12'!L2,'P1:P12'!K2) / SUM('P1:P12'!K2) returns
#REF!
Can anyone help please.
Allan


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 340
Default Weighted Average across worksheets

Sumproduct cannot be used with 3D-references. Try instead:

=SUM(SUBTOTAL(6,INDIRECT("'"&sheets&"'!K2:L2"))) / SUM('P1:P12'!K2)

where "sheets" refers to a range of cells containing the sheet names:
P1,P2,P3,...

AS wrote:
I am aware of the technique using sumproduct to calculate a weighted average
figure, but this doesn't appear to work across worksheets.
I have 12 worksheets named P1 - P12 and am trying to calculate a weighted
average of the cells K2 and L2 on each sheet
The formula =SUMPRODUCT('P1:P12'!L2,'P1:P12'!K2) / SUM('P1:P12'!K2) returns
#REF!
Can anyone help please.
Allan


  #3   Report Post  
Posted to microsoft.public.excel.misc
AS AS is offline
external usenet poster
 
Posts: 5
Default Weighted Average across worksheets

Thanks for that, works fine as an array formula.
As an extension to the problem, I also want to do the same for the cells K2
and M2 on each sheet.
Can you do that for non contiguous cells?

Allan

"Lori" wrote in message
s.com...
Sumproduct cannot be used with 3D-references. Try instead:

=SUM(SUBTOTAL(6,INDIRECT("'"&sheets&"'!K2:L2"))) / SUM('P1:P12'!K2)

where "sheets" refers to a range of cells containing the sheet names:
P1,P2,P3,...

AS wrote:
I am aware of the technique using sumproduct to calculate a weighted

average
figure, but this doesn't appear to work across worksheets.
I have 12 worksheets named P1 - P12 and am trying to calculate a

weighted
average of the cells K2 and L2 on each sheet
The formula =SUMPRODUCT('P1:P12'!L2,'P1:P12'!K2) / SUM('P1:P12'!K2)

returns
#REF!
Can anyone help please.
Allan




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 340
Default Weighted Average across worksheets

For non-contiguous cells, you could try instead:

=SUMPRODUCT(N(INDIRECT("'"&sheets&"'!K2")),N(INDIR ECT("'"&sheets&"'!K2")))

(divided by the sum.)

AS wrote:
Thanks for that, works fine as an array formula.
As an extension to the problem, I also want to do the same for the cells K2
and M2 on each sheet.
Can you do that for non contiguous cells?

Allan

"Lori" wrote in message
s.com...
Sumproduct cannot be used with 3D-references. Try instead:

=SUM(SUBTOTAL(6,INDIRECT("'"&sheets&"'!K2:L2"))) / SUM('P1:P12'!K2)

where "sheets" refers to a range of cells containing the sheet names:
P1,P2,P3,...

AS wrote:
I am aware of the technique using sumproduct to calculate a weighted

average
figure, but this doesn't appear to work across worksheets.
I have 12 worksheets named P1 - P12 and am trying to calculate a

weighted
average of the cells K2 and L2 on each sheet
The formula =SUMPRODUCT('P1:P12'!L2,'P1:P12'!K2) / SUM('P1:P12'!K2)

returns
#REF!
Can anyone help please.
Allan



  #5   Report Post  
Posted to microsoft.public.excel.misc
AS AS is offline
external usenet poster
 
Posts: 5
Default Weighted Average across worksheets

It took me a while to understand it ........ one of the K2 references should
be M2
Changed that and works great.
I prefer this solution whether contiguous or not because it seems to work as
an ordinary formula as well as an array entry formula.
Don't pretend to understand the intricacies !!
Thanks again
Allan


"Lori" wrote in message
oups.com...
For non-contiguous cells, you could try instead:

=SUMPRODUCT(N(INDIRECT("'"&sheets&"'!K2")),N(INDIR ECT("'"&sheets&"'!K2")))

(divided by the sum.)

AS wrote:
Thanks for that, works fine as an array formula.
As an extension to the problem, I also want to do the same for the cells

K2
and M2 on each sheet.
Can you do that for non contiguous cells?

Allan

"Lori" wrote in message
s.com...
Sumproduct cannot be used with 3D-references. Try instead:

=SUM(SUBTOTAL(6,INDIRECT("'"&sheets&"'!K2:L2"))) / SUM('P1:P12'!K2)

where "sheets" refers to a range of cells containing the sheet names:
P1,P2,P3,...

AS wrote:
I am aware of the technique using sumproduct to calculate a weighted

average
figure, but this doesn't appear to work across worksheets.
I have 12 worksheets named P1 - P12 and am trying to calculate a

weighted
average of the cells K2 and L2 on each sheet
The formula =SUMPRODUCT('P1:P12'!L2,'P1:P12'!K2) / SUM('P1:P12'!K2)

returns
#REF!
Can anyone help please.
Allan






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 340
Default Weighted Average across worksheets

Thanks for the reply, glad it works and you corrected the typo.

AS wrote:
It took me a while to understand it ........ one of the K2 references should
be M2
Changed that and works great.
I prefer this solution whether contiguous or not because it seems to work as
an ordinary formula as well as an array entry formula.
Don't pretend to understand the intricacies !!
Thanks again
Allan


"Lori" wrote in message
oups.com...
For non-contiguous cells, you could try instead:

=SUMPRODUCT(N(INDIRECT("'"&sheets&"'!K2")),N(INDIR ECT("'"&sheets&"'!K2")))

(divided by the sum.)

AS wrote:
Thanks for that, works fine as an array formula.
As an extension to the problem, I also want to do the same for the cells

K2
and M2 on each sheet.
Can you do that for non contiguous cells?

Allan

"Lori" wrote in message
s.com...
Sumproduct cannot be used with 3D-references. Try instead:

=SUM(SUBTOTAL(6,INDIRECT("'"&sheets&"'!K2:L2"))) / SUM('P1:P12'!K2)

where "sheets" refers to a range of cells containing the sheet names:
P1,P2,P3,...

AS wrote:
I am aware of the technique using sumproduct to calculate a weighted
average
figure, but this doesn't appear to work across worksheets.
I have 12 worksheets named P1 - P12 and am trying to calculate a
weighted
average of the cells K2 and L2 on each sheet
The formula =SUMPRODUCT('P1:P12'!L2,'P1:P12'!K2) / SUM('P1:P12'!K2)
returns
#REF!
Can anyone help please.
Allan



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
Conditional Average across worksheets madduck Excel Worksheet Functions 3 July 13th 06 07:03 AM
How do I weighted average using Pivot Tables? JP Charts and Charting in Excel 0 May 26th 06 05:10 PM
weighted average formular Charles Excel Worksheet Functions 1 May 8th 06 12:38 AM
weighted average inoexcel Excel Discussion (Misc queries) 3 May 1st 06 10:03 PM
Show weighted average value after filter. BillC Excel Worksheet Functions 3 May 3rd 05 04:13 PM


All times are GMT +1. The time now is 10:55 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"