Explanation
The example shown contains almost 10,000 rows of data.
The data represents temperature readings taken every 2 minutes over a period of days.
Inside theIF function, logical test is entered as B5:B9391=H7.
The TRUE values represent dates that match H7.
This returns an array of values the same size as the first array.
The IF function acts as a filter.
Because we provide IF with an array for the logical test, IF returns anarray of results.
Where the date matches H7, the array contains a temperature value.
In all other cases, the array contains FALSE.
In other words, only temperatures associated with the date in H7 survive the trip through the IF function.
MAX ignores empty cells, the logical values TRUE and FALSE, and text values.
More than one condition can be tested by nesting IF functions.