+ Reply to Thread
Results 1 to 6 of 6

How to Add 0s before Numbers in Excel

Hybrid View

  1. #1
    Registered User
    Join Date
    03-17-2017
    Location
    Toronto, Canada
    MS-Off Ver
    MS 2010
    Posts
    3

    How to Add 0s before Numbers in Excel

    Hi there,

    I have a question about how to add 0s before numbers in Excel.

    For example, I have 12354 84 21354484787 123456789123456, but I want them to be 15-digit numbers.

    So, I add 0s before the numbers, and they will be 000000000012354 000000000000084 000021354484787 123456789123456.

    How can I make the change? I have 260k numbers so I do not want to do it manually...

    Thanks
    Yin

  2. #2
    Forum Contributor
    Join Date
    06-12-2006
    Location
    Portugal
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    212

    Re: How to Add 0s before Numbers in Excel

    Hi,
    Suposing 12354 is in A1 enter the following formula in B1:
    =REPT("0";15-LEN(A1))&A1
    Hope this helps

  3. #3
    Registered User
    Join Date
    03-17-2017
    Location
    Toronto, Canada
    MS-Off Ver
    MS 2010
    Posts
    3

    Re: How to Add 0s before Numbers in Excel

    Thank you genius

  4. #4
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: How to Add 0s before Numbers in Excel

    Here is another way
    Formula: copy to clipboard
    =TEXT(A1,"000000000000000")

    v A B
    1 12354 000000000012354
    2 21354484787 000021354484787
    3 1.23457E+14 123456789123456
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  5. #5
    Registered User
    Join Date
    03-17-2017
    Location
    Toronto, Canada
    MS-Off Ver
    MS 2010
    Posts
    3

    Re: How to Add 0s before Numbers in Excel

    Thank you!

  6. #6
    Registered User
    Join Date
    12-17-2013
    Location
    Greater NYC Area
    MS-Off Ver
    Excel 2010
    Posts
    84

    Re: How to Add 0s before Numbers in Excel

    Or if you just need it to look like there are a bunch of extra 0's in front of every number you could go in to custom number formatting and type in 15 0's in the custom Type field. You wouldn't have to mess with any formulas that way.

+ 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. Replies: 4
    Last Post: 10-11-2016, 01:51 PM
  2. Replies: 19
    Last Post: 07-20-2014, 04:55 PM
  3. Replies: 8
    Last Post: 06-28-2014, 03:26 PM
  4. [SOLVED] Getting Excel 2007 to list the cell numbers of the top five ranked numbers in a column.
    By Securitysports in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-02-2013, 11:42 AM
  5. Excel Formula - Add column of numbers but ignore negative numbers
    By view for Distribution List members in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-06-2006, 10:20 PM
  6. Convert numbers stored as text to numbers Excel 2000
    By Darlene in forum Excel General
    Replies: 6
    Last Post: 01-31-2006, 04:10 PM
  7. Replies: 1
    Last Post: 01-09-2006, 09:30 AM

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