File attached.
I'm trying to input the highest score in cell B16 for the relevant 'Course Played' (B15). The inputted scores for each Course Played are in the range B10:AE30. The data for each course is input down the column under each course name.
File attached.
I'm trying to input the highest score in cell B16 for the relevant 'Course Played' (B15). The inputted scores for each Course Played are in the range B10:AE30. The data for each course is input down the column under each course name.
Perhaps you want:
=MIN(IF(($B$4:$AE$4=B$15)*ISNUMBER($B$10:$AE$10),$B$10:$AE$10))
confirmed with CTRL + SHIFT + ENTER
copied across to K16
(edit: if you want the MAX rather than MIN change the above accordingly - I'm always confused by Stableford rules!)
Last edited by DonkeyOte; 04-06-2010 at 12:32 PM.
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
Great job! Please explain.
I understand the MIN function finds the smallest number using 2 arguments, the IF statement matches the appropriate course to the range selected. I also understand the ISNUMBER function identifies if it's a number, but why is the 1st argument in the IF statement multiplied by the ISNUMBER? Confused!
Many thanks for sorting.
To explain requires outlining a few "general" principles
With all the above points in mind it follows that we can conduct AND tests in Arrays by multiplying together Boolean results - eg:Originally Posted by jibberjabber
(test1)*(test2)
If both tests return TRUE then the result of the multiplication will be 1
(TRUE * TRUE -> 1 * 1 -> 1)
If either / both tests return FALSE then the result of the multiplication will be 0
(TRUE * FALSE -> 1 * 0 -> 0; FALSE * TRUE -> 0 * 1 -> 0; FALSE * FALSE -> 0 * 0 -> 0)
The above coupled with the fact that in reverse we know only 0 equates to FALSE we can use the result of the Boolean coercion as the basis of our IF test, eg:
=IF((test1)*(test2),"apple","banana")
Only if test1 & test2 return TRUE will "apple" result - the other possibilities all result in the AND test generating 0 which is FALSE and thus "banana" will result, eg:
=IF(0,"apple","banana") -> "banana"
=IF(1,"apple","banana") -> "apple"
does that make sense ?
Assuming it does it follows that with regard to your function...
The Array is populated with the values of B10:AE10 only where the corresponding value in row 4 matches B15 and where the value in the cell itself is numeric (ie test1*test2 -> 1)
If either/both conditions fail to hold true the array is populated with a Boolean False by default (rather than the contents of the B10:AE10 cell).
The MIN is applied to the resulting array of values and in this instance only numbers will be evaluated.
Not perhaps the easiest thing to explain given the requisite explanation re: coercion etc...
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks