+ Reply to Thread
Results 1 to 7 of 7

Capitalization of cell upto first number

  1. #1
    Forum Contributor
    Join Date
    11-08-2012
    Location
    Manchester, UK
    MS-Off Ver
    Excel 2016
    Posts
    140

    Capitalization of cell upto first number

    Hello,
    I am looking for a VBA that looks at the value of a cell and capatilizes all letters upto the first number.
    So for example, a cell containing "cOuldBE463.now" would become "COULDBE463.now".
    I have attached an example sheet with 4 different examples.

    Thanking you in advance.
    Attached Files Attached Files

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

    Re: Capitalization of cell upto first number

    Using Power Query, load your file to PQ. Split the column based upon the delimeter "Non Digit to Digit." Upper Case the split column. Merge the columns back together. Here is the Mcode for that action

    Please Login or Register  to view this content.
    File attached for your review.
    Attached Files Attached Files
    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

  3. #3
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,712

    Re: Capitalization of cell upto first number

    Try the below code

    Please Login or Register  to view this content.

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,133

    Re: Capitalization of cell upto first number

    How about
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    11-08-2012
    Location
    Manchester, UK
    MS-Off Ver
    Excel 2016
    Posts
    140

    Re: Capitalization of cell upto first number

    alansidman: Thank you for your help, couldn't really follow what this code was doing other than it put the data into a table which is something I don't want to do. Thank you for your time and help.

    Other two suggestions I understand a little more, have tried them and both work so thank you.

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,133

    Re: Capitalization of cell upto first number

    You're welcome & thanks for the feedback.

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

    Re: Capitalization of cell upto first number

    Suggest you clcik on the link in my signature about Power Query

+ 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] Extract line items in a cell upto the specific number
    By Sekars in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-17-2019, 10:48 PM
  2. [SOLVED] Count the number of occurrence upto now and assign a unique sequence number
    By chathuranga in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-22-2016, 07:25 AM
  3. Formula for refering a cell upto particular number of columns
    By laansesu in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-19-2015, 05:04 AM
  4. Return a number upto a maximum value
    By leiski in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-09-2011, 03:10 PM
  5. Sum everything upto the current row number
    By lampas89 in forum Excel General
    Replies: 6
    Last Post: 04-06-2009, 12:37 PM
  6. Fill the Cell with Zeros upto a fixed number of characters
    By hsmeet in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-15-2008, 10:24 PM
  7. Capitalization of first word in a cell
    By Dave in forum Excel General
    Replies: 5
    Last Post: 04-25-2006, 03:10 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