Forum Discussion
SP3990
May 29, 2025Copper Contributor
lookup value in multiple column and return
Hi Can anyone help me here pls
I need to check this value H47 in columns L & W and return corresponding value from column K or V (whichever applies). Thanks
1 Reply
Sort By
=LET(a, XLOOKUP(G47, E6:E41, L6:L41), b, XLOOKUP(G47, P6:P41, W6:W41), IF(a>b, XLOOKUP(G47, E6:E41, K6:K41), XLOOKUP(G47, P6:P41, V6:V41))
or
=LET(a, XMATCH(G47, E6:E41), b, XMATCH(G47, P6:P41), IF(INDEX(L6:L41, a)>INDEX(W6:W41, b), INDEX(K6:K41, a), INDEX(V6:V41, b))