+ Reply to Thread
Results 1 to 7 of 7

Number length in a cell

  1. #1
    Registered User
    Join Date
    06-18-2014
    Location
    Milton Keynes, England
    MS-Off Ver
    Excel 2010
    Posts
    44

    Number length in a cell

    Hello
    Is there a specific length of number that can be put into a particular cell?

    The reason for asking is that I have a cell with the number 4442811000001100 in it. If I change the last digit to 1 instead of 0 and press return it goes back to 0.
    If I reduce the number to 15 digits then I can successfully change the last digit; however, the numbers I'm using (which are product codes) are mainly 16 digits long.

    Is there a way round this limitation?

    I'd be grateful for any advice on this.

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Number length in a cell

    format cell as text then enter the number
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    06-18-2014
    Location
    Milton Keynes, England
    MS-Off Ver
    Excel 2010
    Posts
    44

    Re: Number length in a cell

    Yep that works so thanks for the input. However, this follows on from another post I made referring to numbers that came in scientific format (4.44281E+15). I have a list of over 177,000 numbers that came in this format. The only way to correctly display these in the cells is by formatting as 'number'; but that leads me back to the 16 digit problem mentioned earlier. I just seem to be going round in circles with this one.

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Number length in a cell

    4.44281E+15 could be
    say
    4442810000000020
    4442810000000000
    or say
    4442809999999980

    no way excel can convert
    4.44281E+15 to all 3 or more so it uses
    4442810000000000
    what/where is your source data perhaps you can import as text as i assume the
    source has the real 16 digit number in it
    Last edited by martindwilson; 12-19-2014 at 09:13 PM.

  5. #5
    Registered User
    Join Date
    06-18-2014
    Location
    Milton Keynes, England
    MS-Off Ver
    Excel 2010
    Posts
    44

    Re: Number length in a cell

    Yeah I worked that out. The source data is prepared in an Oracle database and sent to me in a .csv format. It arrives here with the numbers in scientific format; hence the problem.

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Number length in a cell

    no it doesnt! csv is a text file open it with notepad and you should see the real data,its only excel that changes things as you have it as the default for opening csv
    instead of just opening it in excel
    import instead
    data/from text/ choose the csv file
    click import
    next
    next
    change the field settings for the ones with numbers in them from general to text
    choose a place to import to from the pop up "import data"
    typically opt for " existing worksheet" ,cell a1
    click ok
    Attached Images Attached Images
    Last edited by martindwilson; 12-19-2014 at 10:24 PM.

  7. #7
    Registered User
    Join Date
    06-18-2014
    Location
    Milton Keynes, England
    MS-Off Ver
    Excel 2010
    Posts
    44

    Re: Number length in a cell

    Thanks guys. I'm going to try this out tomorrow. 2:34 now and the eyes have gone!!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Finding a formula that will consider length of cell and length of words
    By Mariah B in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-07-2013, 05:39 PM
  2. [SOLVED] Counting Partial Number Instances Within a Set Number Length.
    By MurasakiK in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-23-2013, 01:56 PM
  3. [SOLVED] Cell length VBA to add trailing characters until a specified length is reached
    By bkeller83 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-24-2013, 10:43 PM
  4. Replies: 7
    Last Post: 10-23-2012, 08:38 AM
  5. Number Length
    By Dohko in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-26-2007, 03:21 PM

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