In Google Sheets, I have a table that looks like this:
A B
ID1 data 123
ID2 data 234
ID1 data 456
ID2 data 567
I want to get data 567
for ID2
. Using Match(...,0)
or VLOOKUP(...,FALSE)
, I get the first value for ID2 - but I want the last.
This answer uses =LOOKUP(2,1/(A1:A4=D1),B1:B4)
, but I saw that the 1/(A1:A4=D1)
notation only works in Excel, not Google sheets.
This link suggests using MATCH(...,1)
, but that only works for sorted keys, which I don't have!
This VBA solution will probably not work in Google Sheets either...
I can add additional hidden columns (may an IsLast
column?), it that would help.