Consulting

Results 1 to 3 of 3

Thread: Function for validating a column name and length of entries

  1. #1
    VBAX Regular
    Joined
    Jan 2008
    Posts
    75
    Location

    Wink Function for validating a column name and length of entries

    Hi All,

    I need help with writing a function that will validate a column A, and length of entries which must not be more or less than 5.

    I am new to vba, and I am still grabbing with it.

    Thanks

    Lucpian

  2. #2
    Do not use VBA.

    Highlight the cells you want to have validated for data entry. Then from the menu choose: Data/Validation. Criteria being Text Length and enter the appropriate restrictions.

    If the data already exists, and you want to find out if any of the entries do not have a length of 5 then use Column B. In cell B2 use the formula: =if(Len(a2)<>5,1,0)

    Copy this formula down for all the data in column A. Sort on Column B and you have all the data in Column A that does not meet your criteria in one place.

    If you must have this in VBA, what do you want the computer to do when it comes across an entry that does not meet your criteria of text length of 5?
    ___________________________________
    g-
    gwkenny@Fin-ITSolutions.com
    ___________________________________

  3. #3
    VBAX Regular
    Joined
    Jan 2008
    Posts
    75
    Location
    Thanks, but I am required to use VBA Code in this project to enable an automated process. So, if anyone can help me, please, I would be very grateful.

    Lucpian

Posting Permissions

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