Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JavyD
 
Posts: n/a
Default Subtotal on Autofilter with Countif

Can this be done, I already have the formula to provide me a count on text
when a column is filtered, the bad thing is that I need it to not count a
cell if it's a Zero. This is the formula I have

=SUMPRODUCT((SUBTOTAL(3,OFFSET(F$6,ROW(F7:F1001)-ROW(F6),,1))))

Now, on that range F7:F1001, The label is March, I need to analyze inventory
turns by company on an item, so If I filter the company to say Dell, I want
to see the items and how many turns as a total we had in March, but it's
counting Zeros too. Can this be done?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom
 
Posts: n/a
Default Subtotal on Autofilter with Countif

Maybe

=SUMPRODUCT(--(F7:F1001<0),--SUBTOTAL(3,OFFSET(F$6,ROW(F7:F1001)-ROW(F6),,1)))


Regards,


Peo Sjoblom


"JavyD" wrote in message
...
Can this be done, I already have the formula to provide me a count on text
when a column is filtered, the bad thing is that I need it to not count a
cell if it's a Zero. This is the formula I have

=SUMPRODUCT((SUBTOTAL(3,OFFSET(F$6,ROW(F7:F1001)-ROW(F6),,1))))

Now, on that range F7:F1001, The label is March, I need to analyze
inventory
turns by company on an item, so If I filter the company to say Dell, I
want
to see the items and how many turns as a total we had in March, but it's
counting Zeros too. Can this be done?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JavyD
 
Posts: n/a
Default Subtotal on Autofilter with Countif

Simply amazing. Peo, what are those --, one thing is getting the solution,
but I want to learn the magic trick.

"Peo Sjoblom" wrote:

Maybe

=SUMPRODUCT(--(F7:F1001<0),--SUBTOTAL(3,OFFSET(F$6,ROW(F7:F1001)-ROW(F6),,1)))


Regards,


Peo Sjoblom


"JavyD" wrote in message
...
Can this be done, I already have the formula to provide me a count on text
when a column is filtered, the bad thing is that I need it to not count a
cell if it's a Zero. This is the formula I have

=SUMPRODUCT((SUBTOTAL(3,OFFSET(F$6,ROW(F7:F1001)-ROW(F6),,1))))

Now, on that range F7:F1001, The label is March, I need to analyze
inventory
turns by company on an item, so If I filter the company to say Dell, I
want
to see the items and how many turns as a total we had in March, but it's
counting Zeros too. Can this be done?




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom
 
Posts: n/a
Default Subtotal on Autofilter with Countif

The unary minuses just coerces TRUE/FALSE values into 1/0 thus you can use
the built in format of SUMPRODUCT which has some benefits, for instance if
you would use

((range1=criteria)*(range2))

and there would be a text value in range2 like for instance a blank from an
IF function ="" then the formula would result in a #VALUE! error whereas

(--(range1=criteria),(range2))

would not

Of course you can use anything like 0+ or 1* but I find it looking less
intrusive and I also heard it might be a few nano seconds faster <bg


Peo


"JavyD" wrote in message
...
Simply amazing. Peo, what are those --, one thing is getting the
solution,
but I want to learn the magic trick.

"Peo Sjoblom" wrote:

Maybe

=SUMPRODUCT(--(F7:F1001<0),--SUBTOTAL(3,OFFSET(F$6,ROW(F7:F1001)-ROW(F6),,1)))


Regards,


Peo Sjoblom


"JavyD" wrote in message
...
Can this be done, I already have the formula to provide me a count on
text
when a column is filtered, the bad thing is that I need it to not count
a
cell if it's a Zero. This is the formula I have

=SUMPRODUCT((SUBTOTAL(3,OFFSET(F$6,ROW(F7:F1001)-ROW(F6),,1))))

Now, on that range F7:F1001, The label is March, I need to analyze
inventory
turns by company on an item, so If I filter the company to say Dell, I
want
to see the items and how many turns as a total we had in March, but
it's
counting Zeros too. Can this be done?






  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JavyD
 
Posts: n/a
Default Subtotal on Autofilter with Countif

Bravooo. Thanks for your help!

"Peo Sjoblom" wrote:

The unary minuses just coerces TRUE/FALSE values into 1/0 thus you can use
the built in format of SUMPRODUCT which has some benefits, for instance if
you would use

((range1=criteria)*(range2))

and there would be a text value in range2 like for instance a blank from an
IF function ="" then the formula would result in a #VALUE! error whereas

(--(range1=criteria),(range2))

would not

Of course you can use anything like 0+ or 1* but I find it looking less
intrusive and I also heard it might be a few nano seconds faster <bg


Peo


"JavyD" wrote in message
...
Simply amazing. Peo, what are those --, one thing is getting the
solution,
but I want to learn the magic trick.

"Peo Sjoblom" wrote:

Maybe

=SUMPRODUCT(--(F7:F1001<0),--SUBTOTAL(3,OFFSET(F$6,ROW(F7:F1001)-ROW(F6),,1)))


Regards,


Peo Sjoblom


"JavyD" wrote in message
...
Can this be done, I already have the formula to provide me a count on
text
when a column is filtered, the bad thing is that I need it to not count
a
cell if it's a Zero. This is the formula I have

=SUMPRODUCT((SUBTOTAL(3,OFFSET(F$6,ROW(F7:F1001)-ROW(F6),,1))))

Now, on that range F7:F1001, The label is March, I need to analyze
inventory
turns by company on an item, so If I filter the company to say Dell, I
want
to see the items and how many turns as a total we had in March, but
it's
counting Zeros too. Can this be done?






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
Autofilter with Subtotal Sumif Robert Christie Excel Worksheet Functions 10 August 3rd 07 12:12 AM
COUNTIF Subtotal Function? jcpotwor Excel Discussion (Misc queries) 2 January 12th 06 01:56 PM
countif for only visible rows when combined with autofilter - possible? johli Excel Discussion (Misc queries) 1 September 21st 05 08:23 AM
How do I use COUNTIF in a SUBTOTAL function to differentiate the . Lettie Excel Worksheet Functions 6 March 22nd 05 08:47 AM
Subtotal And Countif Sheryl Excel Discussion (Misc queries) 4 December 9th 04 07:18 PM


All times are GMT +1. The time now is 09:02 AM.

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"