+ Reply to Thread
Results 1 to 9 of 9

Delete all but the information between "-" and ","

  1. #1
    Registered User
    Join Date
    06-22-2020
    Location
    France
    MS-Off Ver
    2016
    Posts
    5

    Delete all but the information between "-" and ","

    I have a lot of information in one cell:

    Region Benelux - Belgium, Region Benelux - Luxembourg, Region Benelux - Netherlands, Region DACH - Austria, Region DACH - Liechtenstein, Region DACH - Switzerland, Region East - Czech, Region East - Greece, Region East - Latvia, Region East - Poland, Region East - Romania, Region East - Slovakia, Region France - France, Region Iberia - Spain, Region Italy - Italy, Region North - Ireland, Region North - Sweden, Region North - UK, South Africa & Francophone Africa - South Africa

    I would like to find a formula to delete all but the name of the country, that is the information between the "-" and the "," and put all the remaining country words in individual cells of one row.

    Thanks!
    Last edited by KHGH; 06-22-2020 at 07:43 AM.

  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,719

    Re: Delete all but the information between "-" and ","

    Welcome to the forum.

    Results to be in one cell, or in a separate cell for each country?
    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 alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Delete all but the information between "-" and ","

    Is your data all in one column? In one row? Multiple rows? Suggest your read the yellow banner at the top of this page on how to attach a file so that we better understand your workbook layout.
    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

  4. #4
    Registered User
    Join Date
    06-22-2020
    Location
    France
    MS-Off Ver
    2016
    Posts
    5

    Re: Delete all but the information between "-" and ","

    Hey!
    Results to be in separate cells of a row.

  5. #5
    Registered User
    Join Date
    06-22-2020
    Location
    France
    MS-Off Ver
    2016
    Posts
    5

    Re: Delete all but the information between "-" and ","

    The data is in one cell and I would like to have the extracted strings in indiviudal cells of one row.

  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,719

    Re: Delete all but the information between "-" and ","

    Try this in B2 drag copied across:

    =LEFT(TRIM(MID(SUBSTITUTE($A1,"-",REPT(" ",1000)),1000*(COLUMNS($A:A))+1,1000)),FIND(",",TRIM(MID(SUBSTITUTE($A1,"-",REPT(" ",1000)),1000*(COLUMNS($A:A))+1,1000)))-1)

    For your French locale, you may need to change commas to semi-colons.

  7. #7
    Registered User
    Join Date
    06-22-2020
    Location
    France
    MS-Off Ver
    2016
    Posts
    5

    Re: Delete all but the information between "-" and ","

    Thank you so much. This works well.

    An additional question:
    What if there are more of these cells in a column, and I would like to do the same as above for all these cells, but put the results in individual cells of columns (one column per cell)?

    Thanks again, much appreciated.

  8. #8
    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,719

    Re: Delete all but the information between "-" and ","

    Just drag copy the formula down the column.

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

  9. #9
    Registered User
    Join Date
    06-22-2020
    Location
    France
    MS-Off Ver
    2016
    Posts
    5

    Re: Delete all but the information between "-" and ","

    Cool, thank you.

    One last question: How could I do the same and keep the result in one cell?

    Thanks!

+ 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: 5
    Last Post: 02-05-2019, 12:03 AM
  2. Replies: 2
    Last Post: 07-24-2017, 02:19 AM
  3. [SOLVED] Column X-Ref list - Sheet1 Col A "pages", Col B:FL "Req" to Sheet2 ColA "req", ColB "page"
    By excel-card-pulled in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-07-2017, 09:30 AM
  4. Replies: 4
    Last Post: 11-17-2013, 12:05 PM
  5. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  6. Replies: 5
    Last Post: 10-12-2010, 06:46 AM
  7. Replies: 7
    Last Post: 05-13-2006, 05:02 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