lundi 23 décembre 2019

Showing the last value from VLOOKUP

Explanation

The way this spreadsheet should work is by checking if the Status value of the last corresponding Data value, is equal to "OK". If it is, then it'll show the corresponding value in ValueIfOK, in Result, if not, ValueIfOK will be blank, so it should show a blank value in Result.

I created this spreadsheet here to show what I meant above. It can be edited by anyone and doesn't need to login.

Code

=IFERROR(ARRAYFORMULA(
    IF(
        VLOOKUP(A2:A, Sheet2!A2:D, 2, FALSE) = "OK", 
        VLOOKUP(A2:A, Sheet2!A2:D, 3, TRUE)
    )
))

Aucun commentaire:

Enregistrer un commentaire