+ Reply to Thread
Results 1 to 3 of 3

Treat numbers as text

  1. #1
    Registered User
    Join Date
    10-03-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    2

    Treat numbers as text

    I have an Excel spreadsheet with a range of values which are numbers that go to up 20 decimal places, unpivoted from another sheet using the trick from here.

    The trouble is the cells are only displaying 10 digits so, for example, even though the value is 5.46827166811115 it is showing as 5.468271668.

    I've tried setting the format to text but it still wants to treat it as a number, the number of decimal places varies so I can't use a fixed #.### format. The only way I can get it to show is to format the cells as text and to just select and then click in the entry box for each and every cell!

    It then shows a warning that the number in the cell is formatted as text or preceded by an apostrophe but at least it's showing the full value.

    I did find a VBA script that just did something stupidly simple like cell.Value = cell.Value for the selection which seemed to work but I can't find it anymore and I can't reproduce that now.

    Surely there's an easier way to do this? It wouldn't matter so much but when I import this data through SSIS into a VARCHAR(MAX) it's getting the truncated values!
    Last edited by stealf; 10-03-2012 at 06:06 AM. Reason: Found a solution

  2. #2
    Valued Forum Contributor Blake 7's Avatar
    Join Date
    10-01-2010
    Location
    Bogota, Colombia
    MS-Off Ver
    Excel 2010 64 bit and Excel 2007,
    Posts
    1,377

    Re: Treat numbers as text

    so - do u want to see the entire number? 5.46827166811115 but do not want to see the warning? can you upload your workbook?
    Blake 7

    If your question has been answered, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

    If any member's response has helped to solve your problem, please consider using the scales icon on the top right of their post to show your appreciation.

    http://failblog.org/

  3. #3
    Registered User
    Join Date
    10-03-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Treat numbers as text

    The warning doesn't matter.

    I've actually found a solution which it to create a new column B and set the formula to =""&(Ax) which forces it to treat the number as text. I then have to copy this, paste as values and delete the original column A.
    Last edited by stealf; 10-03-2012 at 07:11 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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