Forum Discussion
Number entered as text in text formatted cell
Hello FClifton,
Entering a single apostrophe, "'", before your data (i.e. '12345) will cause your data to be stored as text.
- FCliftonNov 08, 2019Copper Contributor
HelloPReagan ,
Yes, that does enter the number as text, but the apostrophe, "'" is in the cell and makes the VLOOKUP not work. The VLOOKUP needs to be just text as that is what it is in the table which is being searched. But thanks for the suggestion!
Frank
- Patrick2788Nov 08, 2019Silver Contributor
I think the bolded part is what you're interested in. This formula will check for number or text.
=IFERROR(VLOOKUP(TEXT(A2,"0"),table_array,2,0),VLOOKUP(A2*1,table_array,2,0))
- mathetesNov 08, 2019Silver Contributor
FClifton is it possible to rethink the design here? It’s generally a good idea (for avoiding the kind of problem you’re encountering) for the lookup reference to be at the very least consistent in nature (text OR numeric, but not both) and short. Some kind of code can be ideal ( so long as not confused with Cell addresses)