Forum Discussion

Mohit1968's avatar
Mohit1968
Copper Contributor
Mar 19, 2023

number to text function in excel

please help me on how to convert a number in a cell to text in corresponding designated cell

2 Replies

  • NikolinoDE's avatar
    NikolinoDE
    Gold Contributor

    Mohit1968 

    Format numbers as text

    You can convert a number to text in Excel by formatting the cell as text.

    If you format a cell as text, Excel will treat the number as text and not as a numeric value.

     

    To format a cell as text, select the cell and on the Home tab, in the Number group,

    click the arrow next to the Number Format box and choose Text.

     

    To convert a number to text in a cell, you can additional use the TEXT function in VBA.

    The syntax of the function is: =TEXT(Number, Format).

    The function returns a string that represents the number in the specified format.

    For example, to convert the number in cell A1 to text, you can use the following VBA code: Range("A1").Value = Text(Range("A1").Value, "0") .

     

    I hope this helps! 🙂

     

Resources