Find MAX of column from using 2 criterias
Do not want to use Pivot tables
Do not want to use array formula
A2:A15 = month
B2:B15 = licence #
C2:C15 = odometer readings
E1 = lookup month
F1 = lookup licence #
The max is fairly easy:
=SUMPRODUCT(MAX((A2:A15=E1)*(B2:B15=F1)*C2:C15))
The min is a bit convoluted:
=MIN(INDEX(((A2:A15=E1)*(B2:B15=F1)*C2:C15)+((A2:A 15<E1)+(B2:B15<F1))*1E+100,0))
You could use array formulas and include a reminder for the user:
Array entered** :
=MIN(IF(A2:A15=E1,IF(B2:B15=F1,C2:C15)))+N("Array Entered - CSE")
=MAX(IF(A2:A15=E1,IF(B2:B15=F1,C2:C15)))+N("Array Entered - CSE")
** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.
--
Biff
Microsoft Excel MVP
"Sunnyskies" wrote in message
...
Spreadsheet (duh) with 3 columns:
Month, Vehicle Licence #, Odometer readings.
Now looking at the Month and Vehicle Licence #, what is the lowest
odometer
reading and also what is the highest odometer reading, so as to calculate
the
distance travelled.
Do not want to use Pivot tables - as columns will grow.
Do not want to use array formula as end user is as useless as putting
butter
on bread with a toothpick.
Thanks in advance.
|