+ Reply to Thread
Results 1 to 4 of 4

Formatting a number field to hold a specific number of digits

  1. #1
    Registered User
    Join Date
    02-01-2009
    Location
    Minnesota
    MS-Off Ver
    Excel 2007
    Posts
    12

    Formatting a number field to hold a specific number of digits

    Ok...hopefully this is simple fix. I wrote an excel program in Excel'03 for a dental office to manage state assistance patients and one of the table columns is the state assistance number. The problem is that the program defaults to a number format when it is entered instead of a text format, which is what I want. The issue is that state assistance numbers are always 8 digits and when it defaults to a number field the program drops the required preceeding zeros. For example the number 00123456 will sometimes show up as 123456, which is wrong. It's like sometimes it will show up right and other times it gets a butterfly in its brain and deletes those zeros irritating the receptionist here. So, how do I get the table to either stay in text format or set up a number format that keeps the preceeding zeros? Any assistance would be greatly appreciated. Thanks!
    Last edited by shg; 02-12-2009 at 01:12 PM. Reason: enhancing limited vocabulary

  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

    Re: Formatting a number field to hold a specific number of digits

    Since we can't see your code, format the column as 00000000
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Formatting a number field to hold a specific number of digits

    Wrong forum, you should PM a Mod to move to Excel General.

    Use a Custom Format of: 00000000

    If you enter 1234 it will appear as 00001234 though underlying value will be 1234.

  4. #4
    Registered User
    Join Date
    02-01-2009
    Location
    Minnesota
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Formatting a number field to hold a specific number of digits

    Ok...I think that worked. 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