Home > OS >  INDEX Function with fixed amount of results
INDEX Function with fixed amount of results

Time:06-07

Is it possible to get the index function to give a fixed number of results?

I use the following formula to give all results from the Data sheet where A=3 and B=1.

=INDEX(FILTER(Data!$D$2:$D,(Data!$A$2:$A=3)*(Data!$B$2:$B=1)))

I would like to show a fixed amount of results, instead of all the results. So for example I would like to INDEX the first 25 results that meet the filter.

CodePudding user response:

Try

=ARRAY_CONSTRAIN(FILTER(Data!$D$2:$D,(Data!$A$2:$A=3)*(Data!$B$2:$B=1)), 25, 1)

and see if that works?

See also: ARRAY_CONSTRAIN function

CodePudding user response:

You could try:

=QUERY(Data!A2:D,"Select D where A=3 and B=1 Limit 25")
  • Related