+ Reply to Thread
Results 1 to 5 of 5

want to create a function to check a string of length 10

  1. #1
    Registered User
    Join Date
    04-05-2020
    Location
    India
    MS-Off Ver
    2016
    Posts
    6

    want to create a function to check a string of length 10

    i want to create a function to check a string of length 10 character , must have first 5 character only alphabet i.e A-Z or a-z and then 4 character must be only digit
    ant the last character only any alphabet . i tried to write some code but it return error #value. Plz help to correct in given code :
    -

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by amitnigamz; 04-15-2020 at 01:13 PM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,824

    Re: want to create a function to check a string of length 10

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. As you are still new, I have done it for you this time.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: want to create a function to check a string of length 10

    Quote Originally Posted by amitnigamz View Post
    i want to create a function to check a string of length 10 character , must have first 5 character only alphabet i.e A-Z or a-z and then 4 character must be only digit
    ant the last character only any alphabet .
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    04-05-2020
    Location
    India
    MS-Off Ver
    2016
    Posts
    6

    Re: want to create a function to check a string of length 10

    thanks for ur suggestion. ill do accordingly.

    with regards

  5. #5
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,410

    Re: want to create a function to check a string of length 10

    Here is another version of the IsValid function that you can consider...
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. (UPDATE) DEFINING exact length of string for ISTEXT within AGGREGATE function
    By Giulio Severini in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-18-2020, 10:59 AM
  2. Replies: 12
    Last Post: 02-07-2020, 03:51 AM
  3. [SOLVED] MID function with variable string length
    By ABSTRAKTUS in forum Excel General
    Replies: 3
    Last Post: 12-07-2017, 11:32 AM
  4. Check string length and format in the userform.
    By kiki13140702 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-31-2014, 03:13 PM
  5. Replies: 3
    Last Post: 03-11-2013, 01:36 PM
  6. String length function
    By MacroMan! in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-19-2011, 05:14 AM
  7. Replies: 3
    Last Post: 12-08-2010, 07:51 AM

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