I have a table that keeps scores from fantasy football league. The lowest scoring week is not included in the total.
I\'m able to find the lowest score using the
You can also do this using LOOKUP
function and avoiding array formulas, e.g. assuming S2
has the minimum value you can get the last week with that value with this formula in T2
copied down
=LOOKUP(2,1/(B2:R2=S2),B$1:R$1)
This works because (B2:R2=S2)
returns an array of TRUE/FALSE
values, and then dividing 1 by that array gives you an array of 1
s or #DIV/0!
errors. When you use 2
as the lookup value on that array it won't find any 2
s so will therefore match with the last number (the last 1) in the array. That corresponds to the last week with your smallest value so using the top row as the "return vector" means that the formula returns the corresponding week number as required