indexing - Returning the value of a cell corresponding to the 5 latest dates -
so football team use google spreadsheets plan matches ahead , store our results. overview or summary spreadsheet i'm trying show form of team based on latest 5 played matches. list of unplayed , played matches looks this:
type|date|opponent|location|kick off|result|w/d/l
so whenever match has been played complete row of specific match filling in result whatever score achieved (e.g. 2-1,1-1 etc.) , either w d or l in final column based on result. show form of team in last 5 matches thought use easy vlookup return corresponding w d or l, show w w d l w. tried this:
=(vlookup(large datecolumn;1);range;7;true) =(vlookup(large datecolumn;2);range;7;true) =(vlookup(large datecolumn;3);range;7;true) =(vlookup(large datecolumn;4);range;7;true) =(vlookup(large datecolumn;5);range;7;true)
but didn't work unplayed matches in list, returns empty cells. i'm looking way make return value corresponding latest date , isn't empty cell. when doing own search around on subject multi criteria ups can find methods either first or last non empty value, no way last five. because exact workings , logic behind first or last non empty value methods go beyond knowledge, couldn't figure out way modify or combine them other functions make them want. hoping here show me way.
=concatenate(query(b1:h17,"select h h not null order c desc limit 5",0))
you can use query given above. here b1:h17 whole table. h final column wdl , c date column.
wiki
Comments
Post a Comment