
Originally Posted by
imnxcguy
Only one problem is that the assumption you made isn't quite correct -- we actually have to NOT ignore any 0's in finding the minimum values. Basically, the athlete is allowed to "drop" two races, whether they do poorly or they miss because of illness, etc. If they miss a race, they get a zero, so they are allowed to drop that and it becomes one of the minimums. So we would have to adjust that formula.
What happens if they have 2 missed races are both 0's acceptable values ? The above implies only 1 is used but need to be clear.
Assuming all values E:J are valid then alter:
Re: explanation
The INDIRECT approach is just done to allow you to have one common VLOOKUP formula for each Race... given the only thing that changes between columns is the sheet on which the lookup range resides and given said sheet name resides in row 2 you can use INDIRECT to build a "dynamic" sheet reference.
The LOOKUP with BIGNUM will return the last numerical number in the resulting vector, the CHOOSE approach is used to return a 0 to the vector and the result of the VLOOKUP. Should the VLOOKUP return an Error this will be ignored by the LOOKUP so it will return 0, were the result of the VLOOKUP value it would return that number.
A more common approach that you would see would be:
I prefer the LOOKUP method myself as you are not required to do any "double evaluation" ... ie in the above you are essentially looking up D3 twice (once in the MATCH to test for it's existence in the VLOOKUP range) and again in the actual VLOOKUP if indeed it does exist... the LOOKUP method avoids that requirement.
The LOOKUP approach employed here works because the VLOOKUP result is always numeric... were you returning text you would change the LOOKUP to a big text value rather than BIGNUM, ie REPT("z",255) and instead of 0 the CHOOSE would return a null ("") such that your formula returned either a null value (if VLOOKUP error) or the text result of the VLOOKUP were it successful.
I hope that helps.
Bookmarks