[Solved] Converting single number to text?

Discuss the spreadsheet application
Post Reply
CaliRay
Posts: 71
Joined: Sun Apr 26, 2009 6:20 pm

[Solved] Converting single number to text?

Post by CaliRay »

How to convert a single digit number in B1 into a two digit text value in C1? I set C1 format as text and tried the TEXT function and get only errors.
The results of the conversion from a single digit number MUST result in a text that appears as 2 numbers. i.e. 1 in B1 when converted must end up as text 01 in C1.
Last edited by CaliRay on Sat Jan 13, 2018 8:16 pm, edited 1 time in total.
OOo 4.1.3 on Windows 10 Home
FJCC
Moderator
Posts: 9277
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Converting single number to text?

Post by FJCC »

Try

Code: Select all

=TEXT(B1;"0#")
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
CaliRay
Posts: 71
Joined: Sun Apr 26, 2009 6:20 pm

Re: Converting single number to text?

Post by CaliRay »

Thanks for the solution. It works perfectly.
OOo 4.1.3 on Windows 10 Home
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Converting single number to text?

Post by acknak »

If you have formatted the cell as text, then Calc will not recognize the formula when you enter it—it will take it as literal text, and that's all you'll see displayed.

Change the cell format back to "Number/General" or some other numeric-capable format and re-enter the formula.
AOO4/LO5 • Linux • Fedora 23
Post Reply