+ Reply to Thread
Results 1 to 16 of 16

Revert text from a text string after specific words

  1. #1
    Registered User
    Join Date
    03-12-2021
    Location
    CZ
    MS-Off Ver
    MS Excel for Mac, 2019 (version 16.46)
    Posts
    27

    Revert text from a text string after specific words

    Hi, I have a column with a text string in a cell (google sheet) from which I need to extract the words after "Student Username: " and cannot find a working solution, so in below case the result would be aaaa1, bbbb@1, cccc.1

    Any hint? Thank you!

    Student Username: aaaa1
    Student Firstname: aaaa
    Student Lastname: aaaa
    Student Username: bbbb@1
    Student Firstname: bbb
    Student Lastname: bbbb
    Student Username: cccc.1
    Student Firstname: cccc
    Student Lastname: cccc
    Last edited by martin_sushi; 10-05-2023 at 05:10 AM. Reason: Resolved

  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
    80,986

    Re: Revert text from a text string after specific words

    Moved to the GoogleSheets forum section.
    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 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
    80,986

    Re: Revert text from a text string after specific words

    Try:

    =TRIM(MID(A1,FIND(A1,":")+1,99))

  4. #4
    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
    80,986

    Re: Revert text from a text string after specific words

    Sorted?

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) 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 each of those who offered help.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,466

    Re: Revert text from a text string after specific words

    @Ali:
    I need to extract the words after "Student Username: "
    Maybe not fixed yet?
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  6. #6
    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
    80,986

    Re: Revert text from a text string after specific words

    Trevor - mine extracts everything after the colon (which is after the username or firstname), but I'd like feedback from the OP one way or the other. Where there are no expected results, one has to make assumptions! And he's seen the suggestion - common courtesy requires some response from him.
    Last edited by AliGW; 10-04-2023 at 06:41 AM.

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,466

    Re: Revert text from a text string after specific words

    Ali: you misunderstand me. From the expected output (aaaa1, bbbb@1, cccc.1), it looks as though the OP is only interested in extracting values from records with Student Username. Not sure if he would be hoping for blank records to be ommitted.

    As you say, probably best to wait for feedback from the OP .

  8. #8
    Registered User
    Join Date
    03-12-2021
    Location
    CZ
    MS-Off Ver
    MS Excel for Mac, 2019 (version 16.46)
    Posts
    27

    Re: Revert text from a text string after specific words

    Quote Originally Posted by AliGW View Post
    Try:

    =TRIM(MID(A1,FIND(A1,":")+1,99))
    Thank you! Unfortunately it does not work.

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,466

    Re: Revert text from a text string after specific words

    Thank you! Unfortunately it does not work.
    That is not helpful in remedying the problem. In what way does it "not work"? Not return what you want? Return to many records? Error message? What??


    Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file and a mocked up solution.

  10. #10
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,005

    Re: Revert text from a text string after specific words

    Try this in B1 for A1 cell

    Please Login or Register  to view this content.

  11. #11
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,150

    Re: Revert text from a text string after specific words

    Alternative;

    Please Login or Register  to view this content.

  12. #12
    Valued Forum Contributor janmorris's Avatar
    Join Date
    07-24-2021
    Location
    Japan
    MS-Off Ver
    Google Sheets (& Mac 2021)
    Posts
    1,066

    Re: Revert text from a text string after specific words

    This will extract the usernames from each row where the cell contains "Username":

    Please Login or Register  to view this content.
    As a gesture off appreciation, you can click * Add Reputation at the foot of any of the posts of members who helped you reach a solution.

    And finally, was your problem solved? if so, please click Thread Tools above the first post of your enquiry, then select [Solved]

  13. #13
    Registered User
    Join Date
    03-12-2021
    Location
    CZ
    MS-Off Ver
    MS Excel for Mac, 2019 (version 16.46)
    Posts
    27

    Re: Revert text from a text string after specific words

    Quote Originally Posted by windknife View Post
    Try this in B1 for A1 cell

    Please Login or Register  to view this content.
    Thank you so much, this is working!

  14. #14
    Registered User
    Join Date
    03-12-2021
    Location
    CZ
    MS-Off Ver
    MS Excel for Mac, 2019 (version 16.46)
    Posts
    27

    Re: Revert text from a text string after specific words

    Thanks everyone for stepping in! Appreciated your prompt help

  15. #15
    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
    80,986

    Re: Revert text from a text string after specific words

    Glad to have helped.

    If you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) 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 each of those who offered help.

  16. #16
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,005

    Re: Revert text from a text string after specific words

    You are welcome.

+ 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: 10
    Last Post: 08-01-2022, 08:05 AM
  2. [SOLVED] matching specific words in text string to column header
    By macrorookie in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-27-2020, 02:53 PM
  3. [SOLVED] Find matching words in a text string and return one of four words
    By alecoute in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-12-2018, 12:33 PM
  4. Replies: 24
    Last Post: 11-10-2015, 07:27 PM
  5. Replies: 15
    Last Post: 10-12-2014, 08:53 AM
  6. [SOLVED] Macro to convert specific text and format specific text within a string
    By Mencae in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 12-06-2012, 12:13 AM
  7. [SOLVED] Find Specific Text in Text String and Return Value in Adjacent Column
    By watchouse in forum Excel General
    Replies: 2
    Last Post: 07-11-2012, 03:53 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