SOLVED

Need a lookup function for multiple columns and rows

Copper Contributor

Hello, have a problem I am trying to figure out. So I need a function that uses two columns as the lookup (column X & W) and based on the m (column O, P, or Q) with the id (column N) give me a r (column R, S, or T). This is how my data is presented and I know it is not ideal.example.png

Any help is greatly appreciated!

3 Replies

@mrush142 

That could be like

=XLOOKUP(<id> &"="& <m>, <id column> &"="& <mN column>, <rN column> )
When you say mN and rN column, am I supposed to select each columns?

=XLOOKUP(X3&"="&W3,$N$3:$N$5&"="&$O$3:$Q$5,$R$3:$T$5)

The id column needs to be combined with the m column then look up in the other id column combined with whichever mN column (m1, m2, m3) that is the same as the m lookup column. Then return which ever rN value
best response confirmed by mrush142 (Copper Contributor)
Solution

 

=INDEX($R$3:$T$5,XMATCH(X3,$N$3:$N$5,0),XMATCH(W3,XLOOKUP(X3,$N$3:$N$5,$O$3:$Q$5),0))

Messed around and found a solution! Thanks you @Sergei Baklan for the help

1 best response

Accepted Solutions
best response confirmed by mrush142 (Copper Contributor)
Solution

 

=INDEX($R$3:$T$5,XMATCH(X3,$N$3:$N$5,0),XMATCH(W3,XLOOKUP(X3,$N$3:$N$5,$O$3:$Q$5),0))

Messed around and found a solution! Thanks you @Sergei Baklan for the help

View solution in original post