+ Reply to Thread
Results 1 to 3 of 3

Text Formula Returns Many Leading Zeroes Sometimes

  1. #1
    Registered User
    Join Date
    01-08-2010
    Location
    Arizona, USA
    MS-Off Ver
    Microsoft 365 Beta Channel
    Posts
    7

    Text Formula Returns Many Leading Zeroes Sometimes

    Hi,

    Most of the time, my formula returns the expected result.
    But on one instance, it does not whhere the original string is 164 characters long

    Most of the time, i have a simple number like 12345678 in F2
    I use a formula to convert it to text : =Text(F2,REPT("0",LEN(F2))) which returns 12345678 as text.

    However, I also have a 164 character string that looke like 1234567, 12345678, 1234567, ....
    In this instance, my formula is returning 0000000012345678000000....

    Any thoughts as to why?

    Thanks,
    -w

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Text Formula Returns Many Leading Zeroes Sometimes

    If "1234567" is a single text-number, excel treats it likes a number
    But with string "1234567, 12345678,..." it likes real Text string, not number
    Quang PT

  3. #3
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Text Formula Returns Many Leading Zeroes Sometimes

    are you saying that you have an actual number in any given cell that is 164 characters (bytes) long? that would be a string literally like this (chars instead of numbers):
    Please Login or Register  to view this content.
    you might want to take a look at this following link. it seems as though the behavior that's annoying you is default behavior of the program:

    https://www.howtoexcel.org/tutorials/leading-zeros/

+ 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] Insert Dash Into ISSN With Leading Zeroes and Text Characters
    By qwertyk in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-16-2017, 01:49 PM
  2. [SOLVED] Combine numeric text and retaining leading zeroes
    By tuneloon in forum Excel General
    Replies: 4
    Last Post: 12-02-2015, 05:09 PM
  3. Replies: 6
    Last Post: 10-09-2014, 03:05 AM
  4. Replies: 5
    Last Post: 10-10-2012, 06:04 AM
  5. Format-leading zeroes and formula
    By prasjohn in forum Excel General
    Replies: 1
    Last Post: 02-13-2010, 10:43 AM
  6. Leading zeroes in a text field
    By MarlaJ in forum Excel General
    Replies: 8
    Last Post: 02-12-2007, 06:33 PM
  7. Leading zeroes get dropped when converted to text
    By Jason Grunert in forum Excel General
    Replies: 8
    Last Post: 08-04-2006, 04:45 PM

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