+ Reply to Thread
Results 1 to 4 of 4

Create my own function/macro for validation

  1. #1
    Registered User
    Join Date
    11-04-2006
    Posts
    30

    Create my own function/macro for validation

    How would I go about creating my own function or macro to perform complicated validation on a cell? Actually, maybe it isn't complicated validation. To try to be a little clearer, I know how to create macros/functions. Here is what I want to do...

    In a column, I want the user to be able to enter 5 character codes. These codes should only be made up of characters and numbers. They can enter as many as they want (within Excel limits -- the most would probably only be around 10 or so). To enter more than one, I will probably have them enter a space or a comma in between each one. I will figure that out later. Anyway, after they tab out or hit enter, how can I have my validation macro/function run?

    As for the macro/function...
    I should be able to figure out how to create it, but if anyone has something that works already, I would appreciate the help.

    Thanks to all.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482
    don't know, what is the macro supposed to do??

  3. #3
    Registered User
    Join Date
    11-04-2006
    Posts
    30
    I have the macro created. It takes the cell contents, looks at every character to make sure that they are valid. If not, it should be a validation error. If there are extra spaces entered, the macro removes the extra spaces. It also converts any lower case letters to upper case. It then re-populates the cell with the cleaned up data.

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482
    Cool, I am not sure what the question, maybe it's how to activate the macro, is that it?

    You said you have the macro created?

    check out this string for an idea

    http://www.excelforum.com/showthread.php?t=580224

+ 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