SOLVED

XLOOKUP where the lookup value is a formula

Copper Contributor

Hi,

I'm trying to use XLOOKUP where the lookup value is a formula, e.g.,:

     A7 = Hospitality - P0461

     A8 = RIGHT(A7)

     XLOOKUP(A8, table1.some_column, table1.some_other_column)

the XLOOKUP returns #N/A

If I hard-code the value, e.g.,:

     A9 = P0461

     XLOOKUP(A9, table1.some_column, table1.some_other_column) I get the correct value back.

Is there some way to do this as the values in A7 & A8 are dynamic?

Thanks,

--sue

2 Replies
best response confirmed by YeahMan (Copper Contributor)
Solution

@YeahMan 

=RIGHT(A7) returns the rightmost character of A7, i.e. "1"

Does it work if you use =RIGHT(A7,5) ?

I'm an idiot. I realized after I posted the message that my RIGHT was wrong lol. I tried to delete the post but now everyone gets to know!
1 best response

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

@YeahMan 

=RIGHT(A7) returns the rightmost character of A7, i.e. "1"

Does it work if you use =RIGHT(A7,5) ?

View solution in original post