+ Reply to Thread
Results 1 to 5 of 5

VB Macro for Proper Case to Ignore "/" & "-"

  1. #1
    Registered User
    Join Date
    10-07-2008
    Location
    virginia
    Posts
    26

    VB Macro for Proper Case to Ignore "/" & "-"

    I have a Excel text document that I compile from multiple sources, and if they don't leave a "white space" before a "/", "-", or "(" the Proper Case command does not capitalize the word that immediately follows that symbol.

    Please Login or Register  to view this content.

    Thanks for your help in advance.

    jlcford
    Last edited by jlcford; 10-08-2008 at 07:52 AM.

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885
    Hi JLC,

    This probably isn't the greatest code, but it should do what you're asking, at least for the characters /, - and (
    Please Login or Register  to view this content.
    This will append a space after each of those symbols, then do your conversion to proper case, then remove those added spaces.

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Instead of StrConv, use
    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885
    I'll be right back.. have to go smack my forehead.

  5. #5
    Registered User
    Join Date
    10-07-2008
    Location
    virginia
    Posts
    26

    Thumbs up Code Worked

    Thanks for your input. The code you suggested worked perfectly.

    jlcford

+ 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. activate each cell
    By melaniethomson in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-07-2008, 05:59 AM
  2. counting letters but not working in new 2007 excel
    By melaniethomson in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-29-2008, 04:20 AM
  3. Auto change colour of cell when text / letter entered into cell
    By Nik_AU in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-26-2007, 07:36 AM
  4. pls turn this into VB macro
    By vickyho1008 in forum Excel General
    Replies: 11
    Last Post: 12-03-2006, 05:12 PM
  5. type mismatch
    By Mikeyhend in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-16-2006, 01:17 PM

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