+ Reply to Thread
Results 1 to 7 of 7

delete text after comma how to use?

  1. #1
    Registered User
    Join Date
    09-09-2014
    Location
    masr
    MS-Off Ver
    2007
    Posts
    23

    Exclamation delete text after comma how to use?

    Good morning
    I'm newbie in excel and search for how to remove text after comma and found this formula

    =LEFT(A1, FIND(",",A1)-1)

    =if(iserror(find(",",d6,1)),d6,left(d6,find(",",d6,1)-1))

    I don't understand where to put these functions?

    I have 1 column (A) with 20+K list of text
    i want to remove all text after "," comma
    like these
    Émile Zola
    Émile Zola, La Faute de l'abbĂ© Mouret
    Émile Zola, Le Docteur Pascal
    Émile Zola, The Fortune of the Rougons
    Émile Zola, The Masterpiece

    so i tried to put these formulas in first cell in the column then enter , nothing happened
    so please help how to use these function

    thanks

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: delete text after comma how to use?

    Alternatively you coud use Data - Text to columns -use the comma a s separator and choose not to import the second column at the end of the wizard

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: delete text after comma how to use?

    Hi,

    The formulae are essentially the sort of formulae you need for this sort of thing although the specific cell references seem somewhat odd.
    However with your text in A1 use the folloiwng formula in B1 and then copy it down.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    09-09-2014
    Location
    masr
    MS-Off Ver
    2007
    Posts
    23

    Re: delete text after comma how to use?

    2nd question
    to remove non english cells i found this topic

    with this function also
    http://www.excelforum.com/excel-prog...-language.html
    how to use and where to put?

    Sub x()

    Dim rng As Range

    With CreateObject("vbscript.regexp")
    .Global = True
    .Pattern = "[^\d^\w^\s-\.\,]"
    For Each rng In Range("A1").CurrentRegion
    rng = .Replace(rng, "")
    Next rng
    End With

    End Sub

  5. #5
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: delete text after comma how to use?

    Welcome to the Forum, unfortunately:

    This is a duplicate post and as such does not comply with Rule 5 of our forum rules. This thread will now be closed, you may continue in your other thread.

    Thread Merged.

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: delete text after comma how to use?

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

  7. #7
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Thumbs up Re: delete text after comma how to use?

    Hi,
    Welcome to this forum...
    Try the attached file..and tell is that what you were trying to achieve..
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Regards,
    Vikas Gautam
    Excel-buzz.blogspot.com

    Excel is not a matter of Experience, its a matter of Application.

    Say Thanks, Click * Add Reputation

+ 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. Find and remove all text to the left of last comma (including comma) in a cell
    By Excelrookie_1 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-05-2013, 08:47 AM
  2. How to delete comma in text
    By seksis in forum Excel General
    Replies: 3
    Last Post: 04-09-2012, 04:06 AM
  3. Excel 2007 : Code to delete text after comma
    By nlm in forum Excel General
    Replies: 11
    Last Post: 07-26-2011, 03:32 AM
  4. how do I delete text in a cell after a comma
    By dschmitt in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-02-2010, 04:14 AM
  5. Replies: 2
    Last Post: 01-14-2006, 02:30 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