Forum Discussion
SallyC325
Mar 14, 2023Copper Contributor
XLOOKUP when lookup value may be text string or number formatted as text
I have a data set that has lookup value which may be text string or number formatted as text, with the lookup range formatted General. How can I format the lookup value as general? I currently have...
SallyC325
Mar 15, 2023Copper Contributor
Patrick2788Thanks for your response. This returns #VALUE for Text strings (e.g. CBYRH200020) when forcing XLOOKUP to be read as a number so still required an [if_not_found] alternative, if I have understood you correctly?
The lookup range has General format, so numbers look like numbers and text looks like text. Is there a way to force same formatting on the lookup value? I have tried to find the code for "General" format ... and failed.
Patrick2788
Mar 15, 2023Silver Contributor
- Tyrus1366Dec 04, 2024Copper Contributor
Great solution that I've been needing for some time! Thanks Patrick2788 !!