For Countif use below function =COUNT(SUBTOTAL(103,OFFSET(C2, ROW(INDIRECT("1:"&COUNTA(tblStaff[Gender]))),)) *(tblStaff[Gender]="Male")) for averageif Use below function =AVERAGE(SUBTOTAL(103,OFFSET(C2, ROW(INDIRECT("1:"&COUNTA(tblStaff[Gender]))),)) *(tblStaff[Gender]="Male")*tblStaff[Salary])
Hello, do you have a COUNTIFS and a AVERAGEIF version of this formula ?
For Countif
use below function
=COUNT(SUBTOTAL(103,OFFSET(C2,
ROW(INDIRECT("1:"&COUNTA(tblStaff[Gender]))),))
*(tblStaff[Gender]="Male"))
for averageif
Use below function
=AVERAGE(SUBTOTAL(103,OFFSET(C2,
ROW(INDIRECT("1:"&COUNTA(tblStaff[Gender]))),))
*(tblStaff[Gender]="Male")*tblStaff[Salary])
write the formula for the use
it's not working.
Which part is failing
Download worksheet here
www.crispexcel.com/how-to-sumif-data-ignoring-hidden-rows-in-excel/
@@crispexcel can you please check your email.
@@crispexcel After putting the formula, the result I'm getting is "6,127" and not "37,051" that is the total of visible male staff.
@@anshikasahu9193 If you are not using office365 try Ctrl + Shift +Enter instead of just entering it