Forum Discussion
PeterR_TS
May 28, 2020Copper Contributor
XLOOKUP lookup value is formula doesn't work
Hello I have an xlookup formula with lookup value to a cell that has a formula in it. The xlookup returns #N/A when looking at the formula, but if I type a value in the cell it works... why won't ...
terraficke
Aug 09, 2023Copper Contributor
What error did you have? I am running into this exact problem. I am referencing a lookup value that contains a formula (=right(D4,5)) and my xlookup is giving me an error. I am not sure how to be certain that it is searching by the actual cell value.
mathetes
Aug 09, 2023Gold Contributor
In addition to the thoughts by SergeiBaklan, since you're using =RIGHT(D4,5) as the reference in a lookup formula, it's also possible that there's a blank after the text in cell D4, not visible to our human eyes, but very visible to Excel. So that =RIGHT("desiredtext ",5) yields "text " when you think it should be "dtext"
I would second the suggestion by SergeiBaklan that you start a new thread if neither his suggestion nor mine resolves your situation.