+ Reply to Thread
Results 1 to 4 of 4

VBA Proper Case

Hybrid View

  1. #1
    Registered User
    Join Date
    09-19-2016
    Location
    Lightwater
    MS-Off Ver
    2013
    Posts
    7

    Lightbulb VBA Proper Case

    Good morning,

    I have a macro which sorts a lot of data in a spreadsheet I regularly download, and one thing I want to add is changing an upper case column into proper case. None of the vba code I've found online has worked or even really makes sense.
    I want to select column N:N and with selection change case to vbProper Case or something along these lines.

    Any ideas??

    Jemma :-)

  2. #2
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: VBA Proper Case

    Have a look at these lines (May be useful for your case)
    Sub Test()
        Dim str As String
    
        str = StrConv("HELLO WORLD", vbProperCase)
        
        MsgBox str
    End Sub
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  3. #3
    Registered User
    Join Date
    06-21-2013
    Location
    Wiltshire, UK
    MS-Off Ver
    365 Version 2210 Build 16.0.15726.20070
    Posts
    72

    Re: VBA Proper Case

    Sub ConvertPropeCase()
    
    For Each cl In Selection
        cl.Value = WorksheetFunction.Proper(cl.Value)
    Next cl
    
    End Sub
    or per YasserKhalil's suggestion

    Sub ConvertPropeCase()
    
    For Each cl In Selection
        cl.Value = StrConv(cl.Value, vbProperCase)
    Next cl
    
    End Sub
    Isskint, i get satisfaction out of helping others

  4. #4
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: VBA Proper Case

    Obviously this was aimed at wasting my time. Hilarious.
    Instead of saying thanks or even didn't say a word.. You add bad reputation for my post !! that's the first time I see such a situation
    You can explain your issue in more details and upload sample of your workbook
    And don't forget that I am not obliged to post a reply to your thread .. I was just trying to help

+ 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. Upper Case or Proper Case help
    By Excelnoub in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-24-2013, 02:56 PM
  2. [SOLVED] Need the proper syntax to use Case/Select Case in vba properly.
    By rbion in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-16-2013, 02:34 PM
  3. [SOLVED] Proper Case using VBA
    By HangMan in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-22-2013, 10:50 AM
  4. Replies: 3
    Last Post: 10-30-2009, 04:00 PM
  5. proper case
    By stevekirk in forum Excel General
    Replies: 2
    Last Post: 02-26-2007, 06:47 AM
  6. excel'03 how to convert a column from upper case to proper case
    By sharie palmer in forum Excel General
    Replies: 1
    Last Post: 01-30-2006, 07:55 PM
  7. [SOLVED] Excel: How do I change all upper case ss to proper case?
    By Moosieb in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-12-2006, 08:50 PM
  8. Changing Upper case to Proper Case
    By Mountain in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-13-2005, 07:06 PM

Tags for this Thread

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