Forum Discussion

FClifton's avatar
FClifton
Copper Contributor
Nov 07, 2019

Number entered as text in text formatted cell

I have a column where the entire column was selected and the format specified as text. However, when I enter data that looks like a number, e.g. 12345, I get the warning about a number entered as text.  That entry is used in a different cell in a VLOOKUP formula.  The VLOOKUP fails until I change the data to be 'real' text by using Data | Text to Columns.  What can I do to make the data I enter be treated fully as text?  Thanks!

5 Replies

  • PReagan's avatar
    PReagan
    Bronze Contributor

    Hello FClifton,

     

    Entering a single apostrophe, "'", before your data (i.e. '12345) will cause your data to be stored as text.

    • FClifton's avatar
      FClifton
      Copper 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

      • Patrick2788's avatar
        Patrick2788
        Silver Contributor

        FClifton 

        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))

Resources