Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Good Afternoon:
I need to average only the visible cells in a range which has been filtered, i.e. =SUMPRODUCT(--(InjuryType1_2005="Gunshot"),--(Age_2005<0)). I now want to average the age of the victims. I've tried several functions, including =Average(sumproduct....), =SUMPRODUCT(--(InjuryType1_2005="Gunshot"),--(Age_2005<0))/COUNTIF(Age_2005,"<0"), and some others. TIA for your assistance. |
#2
![]() |
|||
|
|||
![]()
If the range is filtered with either Autofilter or Advanced Filter, you
should check Excel Help for the SUBTOTAL function. That function will Sum, Average, etc on only the visible items in a filtered list. See if that works. -- Regards, Ron |
#3
![]() |
|||
|
|||
![]()
=subtotal(1,age column)
will work on (average) only the visible cells "dave roth" wrote: Good Afternoon: I need to average only the visible cells in a range which has been filtered, i.e. =SUMPRODUCT(--(InjuryType1_2005="Gunshot"),--(Age_2005<0)). I now want to average the age of the victims. I've tried several functions, including =Average(sumproduct....), =SUMPRODUCT(--(InjuryType1_2005="Gunshot"),--(Age_2005<0))/COUNTIF(Age_2005,"<0"), and some others. TIA for your assistance. |
#4
![]() |
|||
|
|||
![]()
dave roth wrote:
Good Afternoon: I need to average only the visible cells in a range which has been filtered, i.e. =SUMPRODUCT(--(InjuryType1_2005="Gunshot"),--(Age_2005<0)). I now want to average the age of the victims. I've tried several functions, including =Average(sumproduct....), =SUMPRODUCT(--(InjuryType1_2005="Gunshot"),--(Age_2005<0))/COUNTIF(Age_2005,"<0"), and some others. TIA for your assistance. What are the real ranges and on which range is autofiltering is applied? |
#5
![]() |
|||
|
|||
![]()
This is one option
=AVERAGE(IF((InjuryType1_2005="Gunshot")*(Age_2005 <0),Age_2005)) Confirm the Array-formula with Ctrl + Shift then hit Enter Hope it helped Ola Sandström |
#6
![]() |
|||
|
|||
![]()
Many thanks.
"Duke Carey" wrote: =subtotal(1,age column) will work on (average) only the visible cells "dave roth" wrote: Good Afternoon: I need to average only the visible cells in a range which has been filtered, i.e. =SUMPRODUCT(--(InjuryType1_2005="Gunshot"),--(Age_2005<0)). I now want to average the age of the victims. I've tried several functions, including =Average(sumproduct....), =SUMPRODUCT(--(InjuryType1_2005="Gunshot"),--(Age_2005<0))/COUNTIF(Age_2005,"<0"), and some others. TIA for your assistance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Counting empty cells within a range of cells | New Users to Excel | |||
Applying formula to only NON-EMPTY cells in range | Excel Discussion (Misc queries) | |||
Count cells in one range based on parameters in another range | Excel Worksheet Functions | |||
Visible cells | Excel Worksheet Functions | |||
Strange Problem with Chart and Plot Visible Cells Option | Charts and Charting in Excel |