+ Reply to Thread
Results 1 to 21 of 21

Extract multiple words from a cell in excel

  1. #1
    Registered User
    Join Date
    04-18-2019
    Location
    New Delhi
    MS-Off Ver
    O365
    Posts
    14

    Post Extract multiple words from a cell in excel

    Hello Everyone,

    I am trying to extract certain words which starts from VRM in the cell. I've used below function but it extracts only the few instance where the condition is met and leaves the rest of word where the condition is met. I've attached a copy of the sample data for your reference.

    =TRIM(MID(A4, FIND("VRM", A4), 12)) & ", " & TRIM(MID(A4, FIND("VRM", A4, FIND("VRM", A4) + 1), 12)) & ", " & TRIM(MID(A4, FIND("VRM", A4, FIND("VRM", A4, FIND("VRM", A4) + 1) + 1), 12))


    Sample Data.xlsx

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

    Re: Extract multiple words from a cell in excel

    Are you still using Excel 2013?

    If you have 365, clear ALL results in B2 and put this into B2:

    =LET(data,A2:A6,BYROW(data,LAMBDA(r,TEXTJOIN(",",,TEXTBEFORE(TEXTSPLIT(r,CHAR(10))," ")))))
    Attached Files Attached Files
    Last edited by AliGW; 10-10-2023 at 11:51 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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    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
    30,693

    Re: Extract multiple words from a cell in excel

    UDF

    Please Login or Register  to view this content.
    =VRM(A2)
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,307

    Re: Extract multiple words from a cell in excel

    Is this resolved?

  5. #5
    Registered User
    Join Date
    04-18-2019
    Location
    New Delhi
    MS-Off Ver
    O365
    Posts
    14

    Re: Extract multiple words from a cell in excel

    Hello AliGW,

    Thank You very much for your response it is working absolutely fine. I have a small request if could you please help me understand the formula how it functions and if I want to make any changes like for e.g.: in Row 4 I want to extract these values in output required column. Basically the unique in every row.

    LLC - Services, LLC - Digital, LLC Limited - (UK) - Services, LLC - Generation, LLC - Risk

    Also another quick question is this formula specific to column B only? Suppose I have a similar data in column D and I need output in column E will it not work because when I copy paste the formula and change the range it is not working. The data is another cell is like

    INSURANCE CO., LTD - VTS - VRM318491196 - 2023 - 2029340


    Thanks,
    Ritu Raj
    Last edited by rituraj851; 10-11-2023 at 07:40 AM.

  6. #6
    Registered User
    Join Date
    04-18-2019
    Location
    New Delhi
    MS-Off Ver
    O365
    Posts
    14

    Re: Extract multiple words from a cell in excel

    Hello John,

    Thank You for your response. Sorry, I am not familiar with VBA programming on how to use it and get results. I tried to copy, paste and execute the code in VB editor but nothing worked.

    Thanks,
    Ritu Raj

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Extract multiple words from a cell in excel

    Please show your EXPECTED results (referred to in Post 5) in the Excel file, as I do not understand what you want.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  8. #8
    Registered User
    Join Date
    04-18-2019
    Location
    New Delhi
    MS-Off Ver
    O365
    Posts
    14

    Re: Extract multiple words from a cell in excel

    Hello Glenn,

    Please refer to the Output required2 column attached. I want to extract these values in output required column. Basically the unique in every row

    LLC - Services, LLC - Digital, LLC Limited - (UK) - Services, LLC - Generation, LLC - Risk
    Attached Files Attached Files

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Extract multiple words from a cell in excel

    You need to explain your expected answers for the GREEN shaded cells. Why are certain values EXCLUDED from your expected results?

    My first attempt formula is in column B.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    04-18-2019
    Location
    New Delhi
    MS-Off Ver
    O365
    Posts
    14

    Re: Extract multiple words from a cell in excel

    Hello Ali,

    Thank You very much for your response it is working absolutely fine. I have a small request if could you please help me understand the formula how it functions and if I want to make any changes like for e.g.: in Row 4 I want to extract these values in output required column. Basically the unique in every row.

    LLC - Services, LLC - Digital, LLC Limited - (UK) - Services, LLC - Generation, LLC - Risk

    Also another quick question is this formula specific to column B only? Suppose I have a similar data in column D and I need output in column E will it not work because when I copy paste the formula and change the range it is not working. The data is another cell is like

    INSURANCE CO., LTD - VTS - VRM318491196 - 2023 - 2029340


    Thanks,
    Ritu Raj

  11. #11
    Registered User
    Join Date
    04-18-2019
    Location
    New Delhi
    MS-Off Ver
    O365
    Posts
    14

    Re: Extract multiple words from a cell in excel

    I was giving an example to extract unique example

  12. #12
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Extract multiple words from a cell in excel

    When replying... please make it CLEAR who you are talking to. I offered a solution, with a question, and I have NO IDEA if you have looked at my reply, or answered my question.

  13. #13
    Registered User
    Join Date
    04-18-2019
    Location
    New Delhi
    MS-Off Ver
    O365
    Posts
    14

    Re: Extract multiple words from a cell in excel

    Hi Glenn,

    Apologies for not being clear in my response. I was responding to your question in post 11.

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,307

    Re: Extract multiple words from a cell in excel

    Administrative Note:

    Unfortunately, it has come to our attention you have violated Guideline #3 of our Forum RULES:

    Don't private message, visitor message or email Excel (or Access, Word, etc.) questions to moderators or other members.

    All questions and answers will benefit other posters like yourself when discussed in public threads. The point of having a public forum is to share solutions to common (and sometimes uncommon) problems with all members.

    Breaking this guideline is considered harassment by most of our contributors and thus cannot be tolerated. Repeat offense could lead to a permanent ban, so do take this caution to heart.

  15. #15
    Registered User
    Join Date
    04-18-2019
    Location
    New Delhi
    MS-Off Ver
    O365
    Posts
    14

    Re: Extract multiple words from a cell in excel

    Sorry I was not aware of guideline. I will keep in mind going forward.

  16. #16
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,307

    Re: Extract multiple words from a cell in excel

    If you want help with this, provide more realistc sample data.

  17. #17
    Registered User
    Join Date
    04-18-2019
    Location
    New Delhi
    MS-Off Ver
    O365
    Posts
    14

    Re: Extract multiple words from a cell in excel

    Please refer to the sample data attached.

    I have data in column A where I need to extract word starting with VRM in column C. When I copy paste the formula and change the range it is not working. It returns the result as first word in column A
    Attached Files Attached Files

  18. #18
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,307

    Re: Extract multiple words from a cell in excel

    In C2:

    =TEXTBEFORE(TEXTAFTER(A2:A6,"TAV - ")," -")
    Attached Files Attached Files

  19. #19
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,307

    Re: Extract multiple words from a cell in excel

    You might need this, judging by earlier posts:

    =TEXTBEFORE(TEXTAFTER(A2:A6," - ")," -")

    And I had asked for REALISTIC data!

  20. #20
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,307

    Re: Extract multiple words from a cell in excel

    Seen and gone without a response ...

    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.

  21. #21
    Registered User
    Join Date
    04-18-2019
    Location
    New Delhi
    MS-Off Ver
    O365
    Posts
    14

    Re: Extract multiple words from a cell in excel

    Hello Ali,

    Thank You very much for your support. As you mentioned in post #19 sorry I am not able to share the exact realistic data because it is proprietary information which I am not allowed to share on a public forum which is why I had to prepare a dummy data for my scenario. Hope you can understand.

    Apologies for the delay I was occupied a bit with some stuff which needed immediate attention. Thank you for you guidance on my query and the process to close the thread. I'll do that. And apologies once again for violating Guideline #3 of the Forum.

    Thanks,
    Ritu Raj

+ 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] Search and extract multiple words from an excel cell
    By fsm458 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-19-2022, 06:53 AM
  2. [SOLVED] Extract words from big text in excel cell
    By jesse030 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-18-2016, 10:15 PM
  3. [SOLVED] How to extract multiple words from one cell
    By katie88 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-03-2015, 08:18 PM
  4. Replies: 5
    Last Post: 01-10-2013, 09:51 AM
  5. Looking for appropriate function to extract words in excel cell
    By JayshreeJK in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-07-2012, 04:39 PM
  6. Extract or insert figures words from or to cell in excel 2007
    By Khalid Maqbool in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-30-2012, 02:08 PM
  7. Replies: 6
    Last Post: 03-27-2012, 06:00 AM

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