Example MAX.xlsx

I have uploaded my spreadsheet i have inserted a comment into it and what the outcome should be.
Any help would be great.
Cheers