Forum Discussion

Karolien_Abts's avatar
Karolien_Abts
Copper Contributor
Aug 31, 2024
Solved

subtotal with criteria after filtering

Hi all,   Hope someone here has the solution for the issue I'm facing. I've been asked to generate the following (see picture enclosed): data to be presented line by trial, with for each trial the...
  • Riny_van_Eekelen's avatar
    Sep 01, 2024

    Karolien_Abts Oh my, that's not a very well designed schedule, but I assume you are stuck with it.

     

    Due to the double row set-up for %AREA and %UNCK you can't use the SUBTOTAL functions to count, average, min and max alternating visible rows, other than in the way you have it already.

     

    Add a column to the data (may be hidden) with =SUBTOTAL(103,A4) and copy it down. That will create a column of 1's and 0's now you can use regular COUNTIFS, AVERAGEIFS, MINIFS and MAXIFS where you set the criteria to be only for rows where "Visible" = 1, and "Rating Unit" = %AREA in the Untreated column and %UNCK in all other columns.

    See attached.

     

Resources