View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
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)