+ Reply to Thread
Results 1 to 8 of 8

Capitalize all Entries in a Column

  1. #1
    Forum Contributor
    Join Date
    11-02-2010
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    353

    Capitalize all Entries in a Column

    Hi all,
    I have a spreadsheet that contains a huge amount of data.
    I need a Macro (Not the UPPER formula please) to capitalize Columns T, AA and AB (all the way to the last row) with a press of the Capitalize button.
    I have attached a dummy spreadsheet. Hope you can help me.

    Thank you.
    Attached Files Attached Files
    Last edited by Andrew.Trevayne; 09-07-2017 at 03:28 AM.

  2. #2
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,527

    Re: Capitalize all Entries in a Column

    Hi Andrew,

    Not sure why you don't want to use the UPPER function (even in a macro), but here's how you can do it:

    Please Login or Register  to view this content.
    Regards,

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,941

    Re: Capitalize all Entries in a Column

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Forum Contributor
    Join Date
    11-02-2010
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    353

    Re: Capitalize all Entries in a Column

    Wow! This is super! Thank you both, much appreciate the help.

  5. #5
    Forum Contributor
    Join Date
    11-02-2010
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    353

    Re: Capitalize all Entries in a Column

    I decided to use this:
    Please Login or Register  to view this content.

    Another question, if the entry on cell is already capitalized, is there a way to skip it? Right now I'm getting error when I try to run the codes.
    It appears that it's because some entries are already capitalized.

    I'm getting Type mismatch error on this line --> Range("AB" & i) = UCase(Range("AB" & i))
    Last edited by Andrew.Trevayne; 09-07-2017 at 03:36 AM.

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Capitalize all Entries in a Column

    Maybe:

    Please Login or Register  to view this content.

  7. #7
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Capitalize all Entries in a Column

    Quote Originally Posted by Andrew.Trevayne View Post
    Another question, if the entry on cell is already capitalized, is there a way to skip it? Right now I'm getting error when I try to run the codes.
    It appears that it's because some entries are already capitalized.

    I'm getting Type mismatch error on this line --> Range("AB" & i) = UCase(Range("AB" & i))
    Hi,

    That would not occur due to text already being in capitals. It will occur if you have any error values in the cells.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  8. #8
    Valued Forum Contributor
    Join Date
    06-29-2014
    Location
    Australia
    MS-Off Ver
    MSO 365
    Posts
    1,098

    Re: Capitalize all Entries in a Column

    Hello Andrew,

    Here is another take on Robert's code:-


    Please Login or Register  to view this content.
    However, in Robert's code, if you change this line:-

    Please Login or Register  to view this content.
    to

    Please Login or Register  to view this content.
    it will work as you require (assuming that you would like all letters capitalised).

    I hope that this helps.

    Cheerio,
    vcoolio.

+ 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. [SOLVED] Display column entries in row as vertical entries in a userform listbox
    By nigelog in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-22-2016, 08:10 AM
  2. Replies: 13
    Last Post: 05-11-2014, 06:51 PM
  3. [SOLVED] Capitalize all Letters in Column B..rows will Vary
    By trevor2524 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-12-2013, 12:35 PM
  4. Replies: 1
    Last Post: 02-01-2013, 03:38 PM
  5. Capitalize column of names
    By Jessica Rolfe in forum Excel General
    Replies: 1
    Last Post: 11-20-2012, 12:02 PM
  6. Replies: 2
    Last Post: 02-16-2012, 12:53 PM
  7. Removing repeat entries in a long column of data entries
    By kaizhong1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-15-2010, 01:31 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