Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default count if on Visible - Filtered

Hi,

I'm trying to get a simple conditional formula to work when I Auto Filter.

How can this be done?

I need to calculate the percentage of visible cells that have 1 in them of
the total visible cells

=COUNTIF(G9:G99,1)/COUNTA(G9:G99)
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default count if on Visible - Filtered

Filtered range is A2:B15

Filtered on column A with column B containing some 1's:

=SUMPRODUCT(SUBTOTAL(3,OFFSET(B2:B15,ROW(B2:B15)-MIN(ROW(B2:B15)),,1)),--(B2:B15=1))/SUBTOTAL(3,A2:A15)

Format as PERCENTAGE

--
Biff
Microsoft Excel MVP


"tonyv" wrote in message
...
Hi,

I'm trying to get a simple conditional formula to work when I Auto Filter.

How can this be done?

I need to calculate the percentage of visible cells that have 1 in them of
the total visible cells

=COUNTIF(G9:G99,1)/COUNTA(G9:G99)



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default count if on Visible - Filtered

Assuming your data is in G9:G99 as indicated (G8 is a header), try

=SUMPRODUCT(--(G9:G99=1),SUBTOTAL(3,OFFSET(G9,ROW(G9:G99)-ROW(G9),)))/SUBOTAL(3,G9:G99)




"tonyv" wrote:

Hi,

I'm trying to get a simple conditional formula to work when I Auto Filter.

How can this be done?

I need to calculate the percentage of visible cells that have 1 in them of
the total visible cells

=COUNTIF(G9:G99,1)/COUNTA(G9:G99)

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default count if on Visible - Filtered

Thanks for this. Yes your assumptions were correct.

Did the job once I sorted out your typo, but that was the easy bit.

"JMB" wrote:

Assuming your data is in G9:G99 as indicated (G8 is a header), try

=SUMPRODUCT(--(G9:G99=1),SUBTOTAL(3,OFFSET(G9,ROW(G9:G99)-ROW(G9),)))/SUBOTAL(3,G9:G99)




"tonyv" wrote:

Hi,

I'm trying to get a simple conditional formula to work when I Auto Filter.

How can this be done?

I need to calculate the percentage of visible cells that have 1 in them of
the total visible cells

=COUNTIF(G9:G99,1)/COUNTA(G9:G99)

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default count if on Visible - Filtered

Thanks for the feedback - sorry about the typo.


"tonyv" wrote:

Thanks for this. Yes your assumptions were correct.

Did the job once I sorted out your typo, but that was the easy bit.

"JMB" wrote:

Assuming your data is in G9:G99 as indicated (G8 is a header), try

=SUMPRODUCT(--(G9:G99=1),SUBTOTAL(3,OFFSET(G9,ROW(G9:G99)-ROW(G9),)))/SUBOTAL(3,G9:G99)




"tonyv" wrote:

Hi,

I'm trying to get a simple conditional formula to work when I Auto Filter.

How can this be done?

I need to calculate the percentage of visible cells that have 1 in them of
the total visible cells

=COUNTIF(G9:G99,1)/COUNTA(G9:G99)



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
How do I only delete/clear the visible cells in a filtered list? Merv Excel Worksheet Functions 5 March 2nd 07 07:00 PM
Count Filtered Visible Items that Match Numeric Criteria between two ranges Sam via OfficeKB.com Excel Worksheet Functions 4 September 20th 06 06:39 PM
Help to adapt Formula syntax to work with Visible Filtered Cells Sam via OfficeKB.com Excel Worksheet Functions 6 September 16th 05 11:42 PM
Count Intervals of Filtered TEXT values in Column and Return Count across a Row Sam via OfficeKB.com Excel Worksheet Functions 9 July 31st 05 03:37 AM
average of visible cells in a filtered range dave roth Excel Worksheet Functions 5 May 23rd 05 12:56 PM


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