Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
VLB VLB is offline
external usenet poster
 
Posts: 2
Default Using AutoFilter + sumproduct formula

I have a spreadsheet that has a column that has A and B. It also has a column
that contains a number and another column that contains a %

I have weighted average at the bottom of spreadsheet.

Example:

col A | col B | col C
A-----|---35-|--3.5%
B-----|---49-|--2.7%
B-----|---23-|--1.5%

Average %= x<---------- (sumproduct = (B1:B3,C1:C3)/Sum(B1:B3)

What I need to do is have an autofilter that will filter Column A to show
either All, "A" or "B". When I do this the average formula does not change to
the filtered cells.

I do not know how to use a formula that will select the range for only the
visible (filtered) cells.

In short, how can I do a weighted average for a range of cells using an
autoflter.?

Thanks for any help that you may be able to provide.
  #2   Report Post  
Posted to microsoft.public.excel.misc
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Using AutoFilter + sumproduct formula

Where your table is in A1:C4, with headers in A1:C1, try

=SUM(SUBTOTAL(3,OFFSET(B1,ROW(B2:B4)-ROW(B1),1))*B2:B4*C2:C4)/SUBTOTAL(9,B2:B4)

array entered using Cntrl+Shift+Enter


"VLB" wrote:

I have a spreadsheet that has a column that has A and B. It also has a column
that contains a number and another column that contains a %

I have weighted average at the bottom of spreadsheet.

Example:

col A | col B | col C
A-----|---35-|--3.5%
B-----|---49-|--2.7%
B-----|---23-|--1.5%

Average %= x<---------- (sumproduct = (B1:B3,C1:C3)/Sum(B1:B3)

What I need to do is have an autofilter that will filter Column A to show
either All, "A" or "B". When I do this the average formula does not change to
the filtered cells.

I do not know how to use a formula that will select the range for only the
visible (filtered) cells.

In short, how can I do a weighted average for a range of cells using an
autoflter.?

Thanks for any help that you may be able to provide.

  #3   Report Post  
Posted to microsoft.public.excel.misc
VLB VLB is offline
external usenet poster
 
Posts: 2
Default Using AutoFilter + sumproduct formula

Cheers!

"JMB" wrote:

Where your table is in A1:C4, with headers in A1:C1, try

=SUM(SUBTOTAL(3,OFFSET(B1,ROW(B2:B4)-ROW(B1),1))*B2:B4*C2:C4)/SUBTOTAL(9,B2:B4)

array entered using Cntrl+Shift+Enter


"VLB" wrote:

I have a spreadsheet that has a column that has A and B. It also has a column
that contains a number and another column that contains a %

I have weighted average at the bottom of spreadsheet.

Example:

col A | col B | col C
A-----|---35-|--3.5%
B-----|---49-|--2.7%
B-----|---23-|--1.5%

Average %= x<---------- (sumproduct = (B1:B3,C1:C3)/Sum(B1:B3)

What I need to do is have an autofilter that will filter Column A to show
either All, "A" or "B". When I do this the average formula does not change to
the filtered cells.

I do not know how to use a formula that will select the range for only the
visible (filtered) cells.

In short, how can I do a weighted average for a range of cells using an
autoflter.?

Thanks for any help that you may be able to provide.

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
Array formula and multiplying conditions KR Excel Worksheet Functions 6 September 22nd 06 12:33 AM
Is it possible? DakotaNJ Excel Worksheet Functions 25 September 18th 06 09:30 PM
Adding "OR" to a Sumproduct Formula Duke Carey Excel Worksheet Functions 0 March 21st 06 06:41 PM
Match then lookup Tenacity Excel Worksheet Functions 9 December 3rd 05 05:30 AM
adding two sumproduct formulas together ski2004_2005 Excel Worksheet Functions 1 November 12th 04 09:08 PM


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