Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default Ratio of growth over a filtered set

Assume the following sheet, with columns titles Color, Yesterday, Today

Blue 5 7
Blue 0 9
Red 3 9

It is filtered using an autofilter on Color, and I need to show the total
for Today, but I need to exclude rows with a 0 value in the Yesterday column.

For instance, when filtered on Blue, I need to get 7

I realize I can use SUBTOTAL to get the sum of the C column across the
filtered rows, how do I exclude rows with a 0 value in column B from the
SUBTOTAL ?


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 150
Default Ratio of growth over a filtered set

Assuming that A2:C4 contains the data, try...

=SUMPRODUCT(--($B$2:$B4<0),SUBTOTAL(9,OFFSET($C$2:$C$4,ROW($C$2 :$C$4)-RO
W($C$2),0,1)))

Hope this helps!

In article ,
AlanKohl wrote:

Assume the following sheet, with columns titles Color, Yesterday, Today

Blue 5 7
Blue 0 9
Red 3 9

It is filtered using an autofilter on Color, and I need to show the total
for Today, but I need to exclude rows with a 0 value in the Yesterday column.

For instance, when filtered on Blue, I need to get 7

I realize I can use SUBTOTAL to get the sum of the C column across the
filtered rows, how do I exclude rows with a 0 value in column B from the
SUBTOTAL ?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default Ratio of growth over a filtered set

Yes, it works. I wish I would understand it though. Where can I find a
description of what "--" does ?

Many thanks.


"Domenic" wrote:

Assuming that A2:C4 contains the data, try...

=SUMPRODUCT(--($B$2:$B4<0),SUBTOTAL(9,OFFSET($C$2:$C$4,ROW($C$2 :$C$4)-RO
W($C$2),0,1)))

Hope this helps!

In article ,
AlanKohl wrote:

Assume the following sheet, with columns titles Color, Yesterday, Today

Blue 5 7
Blue 0 9
Red 3 9

It is filtered using an autofilter on Color, and I need to show the total
for Today, but I need to exclude rows with a 0 value in the Yesterday column.

For instance, when filtered on Blue, I need to get 7

I realize I can use SUBTOTAL to get the sum of the C column across the
filtered rows, how do I exclude rows with a 0 value in column B from the
SUBTOTAL ?


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 150
Default Ratio of growth over a filtered set

In article ,
AlanKohl wrote:

Yes, it works. I wish I would understand it though.


Have a look here...

http://j-walk.com/ss/excel/eee/eee001.txt

Where can I find a
description of what "--" does ?


Have a look here...

http://www.mcgimpsey.com/excel/formulae/doubleneg.html

Many thanks.


You're very welcome!
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
Divide x/y should give Ratio x:y,How to express ratio in excel arvind3738 Excel Worksheet Functions 2 July 9th 06 09:40 AM
Ratio Formula jayseeca Excel Discussion (Misc queries) 7 May 26th 06 06:03 PM
How do I express a ratio? Jen Excel Discussion (Misc queries) 2 February 28th 06 12:07 AM
Ratio function Lea Excel Worksheet Functions 2 January 27th 06 03:16 AM
ratio formatting uteowl Excel Discussion (Misc queries) 1 May 5th 05 01:30 AM


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