Forum Discussion
XLOOKUP lookup value is formula doesn't work
JoeUser2004Thanks for replying to your 3 year old message. I managed to get it to work after I posted this message. I had an error in the formula.
- YeahManAug 14, 2023Brass Contributor
Hi terraficke
The error in my formula was that I had the RIGHT incorrectly set up and wasn't grabbing the correct portion of the string.
- mathetesAug 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.
- SergeiBaklanAug 09, 2023Diamond Contributor
As variant you lookup numbers on texts (which looks like numbers) returned by =right(D4,5). If so try
=--right(D4,5)
Whatever, it could be lot of other reasons. It's better to give more details starting the new discussion.