Results 1 to 6 of 6
  1. #1
    kyle1214
    Guest

    Need help formatting cell

    I am a little new to excel and have a question. For organization purposes, I'm wondering if there is a way to format a cell to accept ONLY 15 digits/letters. If there is a way to do this, is there a way to take that a step further and only accept the 15 characters if they start with 000, 010 or 002? Please advise!! [img]/w3timages/icons/yikes.gif[/img]

  2. #2
    Super Moderator WebGenii's Avatar
    Join Date
    Jan 2001
    Location
    Redcliff, Alberta, Canada
    Posts
    4,066
    Thanks
    2
    Thanked 5 Times in 5 Posts

    Re: Need help formatting cell

    what are you trying to do? tell us more.
    [b]Catharine Richardson (WebGenii)
    WebGenii Home Page
    Moderator: Spreadsheets, Other MS Apps, Presentation Apps, Visual Basic for Apps, Windows Mobile

  3. #3
    kyle1214
    Guest

    Re: Need help formatting cell

    I'm trying to track some business data on a spreadsheet, but in order to allow others to use the spreadsheet for data entry also I'd like to make a column of cells that would only accept 15 letters/numbers to lessen the possibility of typos/extra characters in the product number. Is there a way to program cells in a way that they will not allow any more than a set number of characters?

  4. #4
    Super Moderator WebGenii's Avatar
    Join Date
    Jan 2001
    Location
    Redcliff, Alberta, Canada
    Posts
    4,066
    Thanks
    2
    Thanked 5 Times in 5 Posts

    Re: Need help formatting cell

    So, since these are product numbers you won't have to do math with them. That means you can format the cells as text, and Excel will preserve the leading 00's.
    What you might like to take a look at is the Data Validation feature in Excel2K.
    Data, Validation
    Particularly, check out the List setting, in other words you can point at an existing list of product numbers and restrict data entry to that list only. You can maintain the list on a separate sheet(and protect that list from your users. When doing the data entry, users get only items from the list, in a nifty drop down menu.
    Well... anyway, I think it is cool.
    [b]Catharine Richardson (WebGenii)
    WebGenii Home Page
    Moderator: Spreadsheets, Other MS Apps, Presentation Apps, Visual Basic for Apps, Windows Mobile

  5. #5
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Need help formatting cell

    If you are not using Excel 2000 (and therefore don't have the Data Validation feature), or if Data Validation won't work for some other reason, then you can use the worksheet change or selection change events and write VBA code to limit the data entry to whatever you want. That code is pretty tricky to write, so Data Validation would be much easier if it will work.
    Legare Coleman

  6. #6
    5 Star Lounger
    Join Date
    Dec 2000
    Location
    Reading/Swindon, Berkshire, United Kingdom
    Posts
    664
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Need help formatting cell

    If you're using 97 you should have data validation as well, leastways I do.

    Brooke.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •