Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88835

Showing the last value from VLOOKUP

$
0
0

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)
    )
))

Viewing all articles
Browse latest Browse all 88835

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>