+ Reply to Thread
Results 1 to 3 of 3

controlled cell formatting

  1. #1
    Registered User
    Join Date
    06-24-2006
    Posts
    6

    controlled cell formatting

    I need to format cells to seven digits and a letter (e.g. 0123456H). Some of my numbers have 6, 5, or 4 digits and the letter. So I would need to have leading zeros to bring the numbers to seven digits and the letter already in place. Any help please? thanks

    Tony

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Try =right(" " & A1, 8)

  3. #3
    Registered User
    Join Date
    06-24-2006
    Posts
    6
    Thanks a lot, but your formula didn't give me what I was expecting. I tried using IF and worked out a formula using LEN as follows and it worked.

    =IF(LEN(A1)=4,"0000"&A1,IF(LEN(A1)=5,"000"&A1,IF(LEN(A1)=6,"00"&A1,IF(LEN(A1)=7,"0"&A1,""&A1))))

    Thanks just the same maybe this might help others.

+ 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