r/excel•
pswiney

Trying to COUNTIF that adjusts with filtered rows. Can't get the right SUBTOTAL/AGGREGATE combination

solved

I'm trying to update a cell to show the count of completions for a course that changes based on slicers filtering my table.

​

I'm using =SUBTOTAL(103,$L$73:$L$527) to count the total number of cells to divide by (which is dynamic based on filters) for a % but need help with getting the number of completions to be dynamic. The screenshot linked below shows the totals and columns I'm trying to countif. The blank cells do have formulas in them that either show "Completed" or blank depending on what is pulling from my Index/Match on other tables which makes COUNTA a challenge because the cells aren't empty, they just don't show anything based on what it's pulling.

https://imgur.com/a/DKxhxlK

​

I believe it's a combination of =SUMPRODUCT(SUBTOTAL( ROW/OFFSET) or AGGREGATE but I cannot get the right combination or find a way to account for the filtering.

=SUMPRODUCT(SUBTOTAL(103,OFFSET($L$73:$L$527,ROW($L$73:$L$527)-ROW($L$73),0,1)),--($L$73:$L$527="Completed"))

​

Any direction, resources or help would be greatly appreciated.

Posted Jul 24, 2019, 4:14 PM UTC

310
Loading comments…