Match two column and pull the last value in google sheets

Viewed 35

i try to pull last paymant day in this example. I try vlook and this Find the last match from two columns but i dont have items.


date        Action      Payment     Last payment date   
08.01.2022  Payment 100         
09.01.2022  other  action               
10.01.2022  other  action               
11.01.2022  other  action               
12.01.2022  other  action               
13.01.2022  other  action               
14.01.2022  other  action               
15.01.2022  Payment 107         
16.01.2022  Payment 108         
17.01.2022  Payment 109         
18.01.2022  other  action               
19.01.2022  other  action               
20.01.2022  other  action               
21.01.2022  other  action               
22.01.2022  Payment 114         
1 Answers

Given the data below:

data

Use the query formula to get the last payment date:

=query(A2:B, "select A where B = 'Payment' order by A desc limit 1")

Output:

output2

Related