Finding the largest match
Shane Devenshire wrote...
Here is a non-array approach:
=SUMPRODUCT(MAX((A1:A6=H1)*B1:B6))
....
Semipicky: this fails if there are negative values in col B, in which
case the largest value could be negative; also fails if any cell in
col B is nonnumeric text, in which case this formula would return
#VALUE!.
There are times when array formulas ARE the most robust of various
alternatives. This is one of those times.
|