• Need help formatting cell

    Author
    Topic
    #1767918

    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!!

    Viewing 0 reply threads
    Author
    Replies
    • #1776678

      what are you trying to do? tell us more.

      • #1776697

        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?

        • #1776698

          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.

        • #1776715

          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.

          • #1776716

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

            Brooke.

    Viewing 0 reply threads
    Reply To: Need help formatting cell

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: