Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 27
Default SUMPRODUCT with Autofilter

Good Day to all!

I need your help in order to know what function to use to solve my problem.
I have following issue:

- My data starts on A7, finishing on G150, with Autofilter on row 7
- I have a little "summary" on A1:B5 where I'm using the SUBTOTAL function to have the correct figures when I use the Autofilter on row 7.

Among some other informations in the summary (B4), I need the average weight (weighted average) of the commodities in my list, but it needs to work with the Autofilter.
I mean, If I select one location with the Autofilter, I need to have the weighted average for that location only.
Or, If I select "Citrus Fuits" with the Autofilter, I need to have the weighted average for those commodities.

Any chance to do that?

Thanks,
Gustavo.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default SUMPRODUCT with Autofilter

There might be a prettier way but this seems to work

=SUMPRODUCT(((B8:B26)*SUBTOTAL(3,OFFSET(C$7,ROW(C8 :C26)-ROW(C7),,1))),((C8:C26)*SUBTOTAL(3,OFFSET(C$7,ROW( C8:C26)-ROW(C7),,1))))/SUBTOTAL(9,C8:C26)

Would be the same as

=SUMPRODUCT(B8:B26,C8:C26)/SUM(C8:C26)

but it will work on a filtered list

--
Regards,

Peo Sjoblom


"Gustavo Strabeli" wrote in message
...
Good Day to all!

I need your help in order to know what function to use to solve my problem.
I have following issue:

- My data starts on A7, finishing on G150, with Autofilter on row 7
- I have a little "summary" on A1:B5 where I'm using the SUBTOTAL function
to have the correct figures when I use the Autofilter on row 7.

Among some other informations in the summary (B4), I need the average weight
(weighted average) of the commodities in my list, but it needs to work with
the Autofilter.
I mean, If I select one location with the Autofilter, I need to have the
weighted average for that location only.
Or, If I select "Citrus Fuits" with the Autofilter, I need to have the
weighted average for those commodities.

Any chance to do that?

Thanks,
Gustavo.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 27
Default SUMPRODUCT with Autofilter

Dear Peo,

Worked perfectly!!

Thanks a bunch.
Gustavo.


"Peo Sjoblom" escreveu na mensagem ...
There might be a prettier way but this seems to work

=SUMPRODUCT(((B8:B26)*SUBTOTAL(3,OFFSET(C$7,ROW(C8 :C26)-ROW(C7),,1))),((C8:C26)*SUBTOTAL(3,OFFSET(C$7,ROW( C8:C26)-ROW(C7),,1))))/SUBTOTAL(9,C8:C26)

Would be the same as

=SUMPRODUCT(B8:B26,C8:C26)/SUM(C8:C26)

but it will work on a filtered list

--
Regards,

Peo Sjoblom


"Gustavo Strabeli" wrote in message
...
Good Day to all!

I need your help in order to know what function to use to solve my problem.
I have following issue:

- My data starts on A7, finishing on G150, with Autofilter on row 7
- I have a little "summary" on A1:B5 where I'm using the SUBTOTAL function
to have the correct figures when I use the Autofilter on row 7.

Among some other informations in the summary (B4), I need the average weight
(weighted average) of the commodities in my list, but it needs to work with
the Autofilter.
I mean, If I select one location with the Autofilter, I need to have the
weighted average for that location only.
Or, If I select "Citrus Fuits" with the Autofilter, I need to have the
weighted average for those commodities.

Any chance to do that?

Thanks,
Gustavo.


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default SUMPRODUCT with Autofilter

You can use different numbers for the first parameter of the SUBTOTAL
function - you probably have:

=SUBTOTAL(9,G8:G150)

where the 9 indicates to do a SUM. If you change the 9 to 2 it will
give you a COUNT, so you could have:

=SUBTOTAL(9,G8:G150)/SUBTOTAL(2,G8:G150)

Alternatively, you could change it to a 1 which will give you an
average:

=SUBTOTAL(1,G8:G150)

Hope this helps.

Pete


On Apr 12, 3:41 pm, "Gustavo Strabeli"
wrote:
Good Day to all!

I need your help in order to know what function to use to solve my problem.
I have following issue:

- My data starts on A7, finishing on G150, with Autofilter on row 7
- I have a little "summary" on A1:B5 where I'm using the SUBTOTAL function to have the correct figures when I use the Autofilter on row 7.

Among some other informations in the summary (B4), I need the average weight (weighted average) of the commodities in my list, but it needs to work with the Autofilter.
I mean, If I select one location with the Autofilter, I need to have the weighted average for that location only.
Or, If I select "Citrus Fuits" with the Autofilter, I need to have the weighted average for those commodities.

Any chance to do that?

Thanks,
Gustavo.



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
Using AutoFilter + sumproduct formula VLB Excel Discussion (Misc queries) 2 December 8th 06 02:30 AM
Autofilter Grid Excel Discussion (Misc queries) 6 November 26th 06 10:51 PM
SUMPRODUCT and (perhaps) SUBTOTAL with AUTOFILTER Donovan Excel Worksheet Functions 4 June 9th 06 12:06 AM
How to Sort within AutoFilter with Protection on (and AutoFilter . giblon Excel Discussion (Misc queries) 1 February 16th 06 12:23 PM
AutoFilter Ken Excel Discussion (Misc queries) 9 March 23rd 05 03:10 PM


All times are GMT +1. The time now is 04:21 PM.

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

About Us

"It's about Microsoft Excel"