The result is an array like this:

where TRUE represents dates in the same month and year.

The number 1 is then divided by this array.

The result is an array of either 1’s or divide by zero errors (#DIV/0!

Excel formula: Get first entry by month and year

):

which goes into LOOKUP as the lookup array.

LOOKUP assumes data is sorted in ascending order and always does an approximate match.

Finally, LOOKUP returns the corresponding value in result_vector, which contains the amounts in C5:C13.

Excel formula: Get value of last non-empty cell

LOOKUP’s default behavior makes it useful for solving certain problems in Excel.

TEXT Function

The Excel TEXT function returns a number formatted as text.

in a text string with the number format of your choice.

Excel formula: Get date associated with last entry

Excel formula: Get first non-blank value in a list

Excel formula: Lookup latest price

Excel formula: Last row in numeric data

Excel formula: Last row in text data

Excel LOOKUP function

Excel TEXT function