A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
CELL("address", ...) returns a text string (such as $B$42), not a cell reference. SUM cannot use that text as the end of a range, which is why you get #VALUE!.
You can use INDEX directly because it returns a reference:
=SUM(B10:INDEX(B10:B94, MATCH(MAXIFS(A10:A94, A10:A94, "<"&TODAY()), A10:A94, 0)))
If your goal is simply to sum all payments before today, a much simpler formula is:
=SUMIFS(B10:B94, A10:A94, "<"&TODAY())
This sums all values in column B where the corresponding date in column A is earlier than today, without needing MATCH, MAXIFS, or INDEX.
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin