+ Reply to Thread
Results 1 to 5 of 5

formatting cells

  1. #1
    Registered User
    Join Date
    02-14-2012
    Location
    Norwood, MA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Smile formatting cells

    Hello All,

    1st post. I'm sure this topic has been covered numerous times, so please re-direct me to the right location. I am NOT a super strong user in this area. I would like to setup a worksheet with cells that can only have the following:

    alpha characters only in some cells.
    Numeric characters in some cells .
    Numeric characters with no decimal allowed.

    etc,etc.

    Thanks in advance

    BW

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: formatting cells

    Format your data entry areas using data/data validation, this should give you what you need
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    02-14-2012
    Location
    Norwood, MA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: formatting cells

    Dear FDibbins,

    Thank you very much. Extremely helpful.

    BW

  4. #4
    Registered User
    Join Date
    02-14-2012
    Location
    Norwood, MA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: formatting cells

    one more example please. Could you detail how I would set up a cell to allow alpha characters only??

    Regards,

    BW

  5. #5
    Valued Forum Contributor
    Join Date
    12-16-2004
    Location
    Canada, Quebec
    Posts
    363

    Re: formatting cells

    Hi would look in regular expression
    If you're able to add "Microsoft VBScript Regular Expressions" as a reference to your project, you can use the following:
    Please Login or Register  to view this content.
    Regular expressions are very powerful. I'm not sure if this will run faster than your loop, but it's worth a shot. More info on RegExp can be found at http://msdn.microsoft.com/library/de...xpressions.asp
    Denis

    Please always attach the sample workbook without sensitive information when asking for help

    To add a module
    Press Alt + F11 (this is the Visual Basic Environment)
    Insert Menu, select Module
    Past code there
    Close Visual Basic Environment (X)

+ 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