View Single Post
 
Old 01-10-2024, 08:38 AM
p45cal's Avatar
p45cal p45cal is offline Windows 10 Office 2021
Expert
 
Join Date: Apr 2014
Posts: 956
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

Looks like you're still on Excel 2013; can you confirm?

If so, then this is not straightforward. I've put together one solution, but it's not great. If I think of a better solution I'll post again.
So, in cell E5:
Code:
=INDEX(B5:B1000,MATCH(MAX(IF(B5:B1000>INDEX(B5:B1000,MAX((B5:B1000<>"")*(ROW(B5:B1000)))-ROW(B5)+1),ROW(B5:B1000))),IF(B5:B1000>INDEX(B5:B1000,MAX((B5:B1000<>"")*(ROW(B5:B1000)))-ROW(B5)+1),ROW(B5:B1000)),0))
which should be entered onto the sheet using Ctrl+Shift+Enter, not just plain Enter (called array-entering).

A slight variant, array-entered into cell G5 to give the date:
Code:
=INDEX(A5:A1000,MATCH(MAX(IF(B5:B1000>INDEX(B5:B1000,MAX((B5:B1000<>"")*(ROW(B5:B1000)))-ROW(B5)+1),ROW(B5:B1000))),IF($B$5:$B1000>INDEX(B5:B1000,MAX((B5:B1000<>"")*(ROW(B5:B1000)))-ROW(B5)+1),ROW(B5:B1000)),0))
Note that as @ArviLaanements pointed out, this one uses previous row, not previous date.

Also, it currently looks only at rows 5 to 1000, you need to adjust it if you need more rows (or fewer too, perhaps).
Note that it depends on there being all empty cells in that range in column B below the last score.

If you're on Office 365 the formula can be much shorter.

See attached.
Attached Files
File Type: xlsx msofficeforums51894EXCEL FORUM EXAMPLE.xlsx (10.6 KB, 9 views)

Last edited by p45cal; 01-10-2024 at 04:27 PM.
Reply With Quote