+ Reply to Thread
Results 1 to 12 of 12

Check for consecutive upper letters in a cells text

  1. #1
    Registered User
    Join Date
    05-12-2021
    Location
    Europe
    MS-Off Ver
    365
    Posts
    45

    Check for consecutive upper letters in a cells text

    Hello,

    I want to check for 2 consecutive upper letters in a cells text, in order to extract the upper text after the upper letters.

    Example: In cell A1 i have the following text: " Advance Payment FOR JOHN SMITH ". All my data follows this pattern. I want to extract " FOR JOHN SMITH" from that cell.

    I found and modified a formula the check for upper letters and join them with spaces between them:

    =TEXTJOIN(" ",TRUE,TRIM(IFERROR(INDEX(MID(A1,ROW(INDIRECT("$A1:$A"&LEN(A1))),1),IF(ISNUMBER(MATCH(CODE(MID(A1,ROW(INDIRECT("$A1:$A"&LEN(A1))),1)),ROW(65:90),0)),ROW(INDIRECT("$A1:$A"&LEN(A1))),"…")),"")))

    But this returns me : "A P F O R J O H N S M I T H"

    I dont want the first 2 upper letters, that is why i need to check for 2 consecutive upper letters.

    PS: I dont need vba codes, this needs to be used by users with basic skills, they wont use macros
    Attached Files Attached Files
    Last edited by AliGW; 07-29-2021 at 09:13 AM. Reason: Offensive comment edited.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,369

    Re: Check for consecutive upper letters in a cells text

    Administrative Note:

    Although we value your privacy as much you do, it could be important that members have a rough idea of your location as the solutions they offer may be affected by your locale. For instance, you might in the future post questions which are related to your regional settings.

    With this in mind, please update your profile to something more precise (something such as UK, Europe, USA, UAE, etc. will suffice).

    Thank you for helping us to help you.
    Last edited by AliGW; 07-29-2021 at 09:13 AM.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft? Excel? for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,005

    Re: Check for consecutive upper letters in a cells text

    Try

    =SUBSTITUTE(A1,"Advance Payment ","")

  4. #4
    Registered User
    Join Date
    05-12-2021
    Location
    Europe
    MS-Off Ver
    365
    Posts
    45

    Re: Check for consecutive upper letters in a cells text

    the information before the all upper letters is different, cant use any default text in my formula.

    also, tried this in many variations, wont work

    Thank you anyway
    Last edited by AliGW; 07-29-2021 at 08:33 AM. Reason: PLEASE don't quote unnecessarily!

  5. #5
    Registered User
    Join Date
    05-12-2021
    Location
    Europe
    MS-Off Ver
    365
    Posts
    45

    Re: Check for consecutive upper letters in a cells text

    i changed my location, thank you for the recommendation.
    Last edited by iustin; 07-29-2021 at 09:01 AM.

  6. #6
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Check for consecutive upper letters in a cells text

    Please try


    =TRIM(CONCAT(REPT(MID(A1,SEQUENCE((LEN(A1)+1)/2,,,2),2),EXACT(MID(A1,SEQUENCE((LEN(A1)+1)/2,,,2),2),UPPER(MID(A1,SEQUENCE((LEN(A1)+1)/2,,,2),2))))))
    Attached Files Attached Files
    Last edited by Bo_Ry; 07-29-2021 at 09:33 AM.

  7. #7
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,513

    Re: Check for consecutive upper letters in a cells text

    In B1

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  8. #8
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    2,956

    Re: Check for consecutive upper letters in a cells text

    If "2 consecutive upper letters in a cells text" means the first 2 words, then formula: =TRIM(MID(A1,FIND(" ",A1,FIND(" ",A1)+1),LEN(A1)))

  9. #9
    Registered User
    Join Date
    05-12-2021
    Location
    Europe
    MS-Off Ver
    365
    Posts
    45

    Re: Check for consecutive upper letters in a cells text

    Quote Originally Posted by Bo_Ry View Post
    Please try


    =TRIM(CONCAT(REPT(MID(A1,SEQUENCE((LEN(A1)+1)/2,,,2),2),EXACT(MID(A1,SEQUENCE((LEN(A1)+1)/2,,,2),2),UPPER(MID(A1,SEQUENCE((LEN(A1)+1)/2,,,2),2))))))
    Wow, this is perfect.

    Thank you very much

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,369

    Re: Check for consecutive upper letters in a cells text

    You may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who helped.

  11. #11
    Registered User
    Join Date
    05-12-2021
    Location
    Europe
    MS-Off Ver
    365
    Posts
    45

    Re: Check for consecutive upper letters in a cells text

    Quote Originally Posted by kvsrinivasamurthy View Post
    In B1

    Please Login or Register  to view this content.
    Wow, this is amazing. It works perfectly.

    Thank you very much

  12. #12
    Registered User
    Join Date
    05-12-2021
    Location
    Europe
    MS-Off Ver
    365
    Posts
    45

    Re: Check for consecutive upper letters in a cells text

    Quote Originally Posted by AliGW View Post
    You may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who helped.
    Thank you for telling me this.

    I already done this for the people that helped me, I took my time and read all the rules and FAQ.

+ 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: 9
    Last Post: 09-18-2018, 03:55 AM
  2. [SOLVED] INDEX/MATCH Not Working For Any Text With 2 Same Consecutive Letters?
    By Ourkid123uk in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-16-2017, 03:01 PM
  3. Replies: 16
    Last Post: 11-09-2014, 08:32 PM
  4. Replies: 4
    Last Post: 07-25-2012, 11:40 PM
  5. Replies: 17
    Last Post: 05-20-2011, 01:48 AM
  6. Text to Coloumns, by consecutive capital letters
    By paperclip in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-20-2006, 07:38 AM
  7. How do I create upper/lower case letters in cells?
    By boz130 in forum Excel General
    Replies: 1
    Last Post: 09-14-2005, 02:06 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