+ Reply to Thread
Results 1 to 7 of 7

Numbe to Text

  1. #1
    Registered User
    Join Date
    03-29-2007
    MS-Off Ver
    365
    Posts
    70

    Numbe to Text

    I have a column with numbers on a worksheet. I would like to convert the number to text. All converted text should have 15 characters. If the original number has less than 15 characters, fill space from the left of the text.

    Eg.

    20000.00 will become " 20000.00". ( no quotation marks in the cell)

    Thanks in advance for any help.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    you mean?

    Please Login or Register  to view this content.
    12 spaces after first "", then .00"
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    03-29-2007
    MS-Off Ver
    365
    Posts
    70
    Quote Originally Posted by NBVC
    you mean?

    Please Login or Register  to view this content.
    12 spaces after first "", then .00"

    Not really. The total number of character of text should be 15 for all cells. The last 3 character is always ".00".

    For example,

    if the number is 5000, the return value should be ("8 space"5000.00).
    if the number is 2000000.00, the return value should be ("5 space"2000000.00)

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,445
    Have you tried the ? format code? =text(a1,"????????????0.00")
    And note that I've set it up to return 16 characters (15 digits), which I think is what you really intended. The lowly decimal point is still a character. If I've misinterpreted, that requirement, adjust accordingly. If it still doesn't work, explain what it does and doesn't do correctly.

  5. #5
    Registered User
    Join Date
    03-29-2007
    MS-Off Ver
    365
    Posts
    70
    Mr Shorty,

    The formula does not really resolve the situation. Certainly, the decimal point considers one character. See the example in the above correspondnace of what I am looking for.

    Thanks...

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Have you tried the formula.... for me it works.

    =TEXT(A1,"????????????.00") will give you 15 characters, including spaces.

  7. #7
    Registered User
    Join Date
    03-29-2007
    MS-Off Ver
    365
    Posts
    70
    NBVC and MrShorty,

    The formula works now if I use "?" instead of "Space".

    Great Help.. Thanks a lot...

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1