+ Reply to Thread
Results 1 to 9 of 9

Capitalize words in numbered list

  1. #1
    Registered User
    Join Date
    11-12-2018
    Location
    Pavia, Italy
    MS-Off Ver
    MS Office 2016
    Posts
    7

    Capitalize words in numbered list

    This is a sample from my data set. All lines are within a same column

    Please Login or Register  to view this content.
    My aim is to capitalize the first letter of the first word in each numbered listing, to obtain this

    Please Login or Register  to view this content.
    Every contribution to the automation of this task will be greately appreciated!!

  2. #2
    Banned User!
    Join Date
    10-12-2018
    Location
    Texas
    MS-Off Ver
    2010
    Posts
    358

    Re: Capitalize words in numbered list

    Proper case maybe?

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-12-2018
    Location
    Pavia, Italy
    MS-Off Ver
    MS Office 2016
    Posts
    7

    Re: Capitalize words in numbered list

    Thank you for your contribution! Unfortunately, running your code as a Macro, it would make every single word begin with a capital letter. My aim is to capitalize only 1) Word1 word2 2)Word3 etc.

  4. #4
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: Capitalize words in numbered list

    The following gets you closer. There may be a few special cases where it fails, but I think it works accurately for your example.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-12-2018
    Location
    Pavia, Italy
    MS-Off Ver
    MS Office 2016
    Posts
    7

    Re: Capitalize words in numbered list

    Thank you so much, that does it indeed. Could you change the code so that I can apply it to the whole sheet? (and not only to "active cell"? Thank you again!!

  6. #6
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: Capitalize words in numbered list

    This should be closer to what you want. It assumes that your data is in column A. If it is in a different column then change the 2 occurrences of cells(1,1) to cells(1,n) where n is 2 for column-B etc.

    Make a backup of your data before running!

    Please Login or Register  to view this content.

  7. #7
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,909

    Re: Capitalize words in numbered list

    Or try this:
    Please Login or Register  to view this content.
    1.Select range

    2.Run sub UPPER_All()

  8. #8
    Registered User
    Join Date
    11-12-2018
    Location
    Pavia, Italy
    MS-Off Ver
    MS Office 2016
    Posts
    7

    Re: Capitalize words in numbered list

    GeoffW283 Mmmh. Running that code as Macro gives me as a result (both in MS Excel 2010 and 2016) a Visual Basic error dialogue reading "Run-time error '5': / Invalid procedure call or argument"

  9. #9
    Registered User
    Join Date
    11-12-2018
    Location
    Pavia, Italy
    MS-Off Ver
    MS Office 2016
    Posts
    7

    Re: Capitalize words in numbered list

    Quote Originally Posted by Phuocam View Post
    Or try this:
    Please Login or Register  to view this content.
    1.Select range

    2.Run sub UPPER_All()
    This worked flowlessly! Thank you again!!

+ 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. Replies: 15
    Last Post: 08-07-2017, 02:40 PM
  2. [SOLVED] Capitalize words within parentheses
    By pkew22 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-27-2016, 06:37 PM
  3. [SOLVED] Update cell - Capitalize words on condition
    By Parth007 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-15-2016, 05:47 AM
  4. Combine cells of portions of a numbered list into a continous numbered list
    By AusTempest in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-17-2014, 01:55 AM
  5. Replies: 3
    Last Post: 08-14-2013, 10:38 AM
  6. Replies: 6
    Last Post: 01-18-2013, 12:01 PM
  7. numbered list
    By donxkey in forum Excel General
    Replies: 3
    Last Post: 03-13-2008, 07:57 AM

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