Results 1 to 5 of 5

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

Threaded View

  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.

     Sub Proper_Case_Inner(Optional mySelection As String)
         Application.ScreenUpdating = False
         Application.Calculation = xlCalculationManual
         Dim cell As Range
         Dim rng As Range
         On Error Resume Next   'In case no cells in selection
         If mySelection = "" Then Set rng = Selection _
             Else Set rng = Range(mySelection)
         For Each cell In Intersect(rng, _
                rng.SpecialCells(xlConstants, xlTextValues))
            cell.Formula = StrConv(cell.Formula, vbProperCase)
    ......

    Thanks for your help in advance.

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

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