How to use operations in Google Sheets when referencing another sheet

Viewed 36

I would like to know how to get the min and max from a sheet into another sheet. Example: my Sheet1 has this data: enter image description here

And I would like to reference sheet 1 in sheet 2 to get the max and min number of orders for each item

enter image description here

1 Answers

Do try

=QUERY(L1:M9, 
    "select L, min(M), max(M) where L<>'' 
     group by L 
     label min(M) 'Min order', max(M) 'Max order' ",1) 

enter image description here

As an alternative you can use

={MINIFS(M2:M,L2:L,"="&O3),MAXIFS(M2:M,L2:L,"="&O3)}

enter image description here

Functions used:

Related