In Google Sheets I have a table like this:JOB             TYPE       STATUSGenerate files  Scheduled  In ProgressUpdate certs    Manual     CompletedCopy files      Scheduled  Pending... (hundreds of rows)Rows are sorted by descending priority. I need to count the STATUS values of the top 20 Scheduled jobs:Top 20 Scheduled Jobs: Completed:   2                       In Progress: 4                       Pending:     14I can use FILTER to select all the Scheduled jobs, but how do I select the top 20 rows from that result (meaning the first 20 rows after the filter has been applied)?
Select top n filtered rows in Google Sheets
google spreadsheets
UNTESTED. Please try:  =countif(array_constrain(filter(C:C,B:B=Scheduled),20,1),E2)  and cop down where E2, E3 and E4 contain Completed, In Progress and Pending respectively.