+ Reply to Thread
Results 1 to 4 of 4

Upper Case a Particular String of Text

  1. #1
    Registered User
    Join Date
    08-11-2016
    Location
    New York
    MS-Off Ver
    2013
    Posts
    78

    Upper Case a Particular String of Text

    Hello Excel Gurus,

    I'm currently looking for a way to adjust part of a text string. I tried using nested formulas and looked into using VB code but to no avail. Below is the goal I'm trying to achieve..

    Before:
    Hello world this is a test - Only testing this

    After(the goal I want to achieve):
    HELLO WORLD THIS IS A TEST - Only testing this

    The majority of these terms will change in length but I would like everything to be Uppercase before the "-".

    Any help on this would be appreciated!

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Upper Case a Particular String of Text

    Assuming the original text is in A1 try this.

    =IFERROR(UPPER(LEFT(A1, FIND("-", A1)-1))& MID(A1, FIND("-", A1)-1, LEN(A1)),A1)
    If posting code please use code tags, see here.

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Upper Case a Particular String of Text

    Hi,

    Here is another formula that will do what you want. Put your text in A1 and then this formula will do it.

    =SUBSTITUTE(A1,LEFT(A1,FIND("-",A1)),UPPER(LEFT(A1,FIND("-",A1))))
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Registered User
    Join Date
    08-11-2016
    Location
    New York
    MS-Off Ver
    2013
    Posts
    78

    Re: Upper Case a Particular String of Text

    Dear Norie & MarvinP,

    Thank You for taking the time for looking into this! Both solutions worked perfectly. Thanks again for taking the time to solve this issue.

+ 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: 1
    Last Post: 07-14-2016, 05:51 AM
  2. [SOLVED] overriding upper /lower/proper case in a string
    By grkchakri in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-01-2015, 12:23 AM
  3. RegExp to separate Upper from Lower Case Char In String
    By bdb1974 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-17-2011, 12:31 PM
  4. Split string by upper/lower case
    By adam_c in forum Excel General
    Replies: 5
    Last Post: 12-10-2010, 12:04 PM
  5. Replies: 2
    Last Post: 12-09-2005, 05:15 AM
  6. Replies: 14
    Last Post: 08-25-2005, 10:05 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