+ Reply to Thread
Results 1 to 4 of 4

Custom formatting combining text and numbers

  1. #1
    Registered User
    Join Date
    01-26-2012
    Location
    Ontario
    MS-Off Ver
    Excel 2007
    Posts
    6

    Custom formatting combining text and numbers

    Hello everyone,

    I would like to create a custom format for entering driver's license numbers.

    eg When I type a12341234512345, I would like it to appear as A1234-12345-12345.

    Any help would be greatly appreciated.
    Last edited by Gryphen957; 02-01-2012 at 11:15 AM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Custom formatting combining text and numbers

    Custom formats only applies to numbers as far as I can tell. You would need to employ a macro that watches that column an "retypes" anything entered in that column to the correct format. Would VBA be acceptable?

    If so, click GO ADVANCED and use the paperclip icon to post up a copy of your workbook. Let us see where/what you need this. Be sure to provide all the specifics of driver's license numbers for your requirements.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: Custom formatting combining text and numbers

    I think you cannot do that.. a way is to have another column and reference it to those alphanumeric.
    Say in A1 = a12341234512345

    in B1 = =LEFT(A1,5)&"- "&MID(A1,5,5)&" -"&RIGHT(A1,5)
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  4. #4
    Registered User
    Join Date
    01-26-2012
    Location
    Ontario
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Custom formatting combining text and numbers

    Thought it might be something like that. Thanks.

+ 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