Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I only delete/clear the visible cells in a filtered list? | Excel Worksheet Functions | |||
Count Filtered Visible Items that Match Numeric Criteria between two ranges | Excel Worksheet Functions | |||
Help to adapt Formula syntax to work with Visible Filtered Cells | Excel Worksheet Functions | |||
Count Intervals of Filtered TEXT values in Column and Return Count across a Row | Excel Worksheet Functions | |||
average of visible cells in a filtered range | Excel Worksheet Functions |