+ Reply to Thread
Results 1 to 6 of 6

How to add leading zeros please

Hybrid View

  1. #1
    Valued Forum Contributor
    Join Date
    03-16-2012
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    992

    Re: How to add leading zeros please

    =IF(LEN("reference")=4;"0"&"reference";"reference") (where "reference" is your data-cell)

    Be aware that your data will be treated as text by Excel.
    Sincerely
    S?ren Larsen

    "Give a man a fish, and you'll feed him for a day. Give a man a fishing rod, and he'll steal your yacht!"

  2. #2
    Registered User
    Join Date
    03-05-2012
    Location
    Yorkshire
    MS-Off Ver
    Excel 2016
    Posts
    79

    Re: How to add leading zeros please

    Hi Søren,
    thanks for the post. Excuse me but I cannot get it to work. I have replaced "reference" with A2 and get a message coming up saying a problem with the formula. I have previously used a method of formatting the row I think. Does that ring any bells please?

+ 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