+ Reply to Thread
Results 1 to 4 of 4

Extract text to left of number of bracket

  1. #1
    Forum Contributor
    Join Date
    04-21-2009
    Location
    England
    MS-Off Ver
    Excel 2016
    Posts
    710

    Extract text to left of number of bracket

    Hi there, if I have a text string in cell A1, what code can I use in B1 that will extract the text from A1 before the first number or bracket?

    Example:

    Sebs Sensei (IRE) 8/1 would be - Sebs Sensei
    Ermine Ruby 4/1 would be - Ermine Ruby

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Extract text to left of number of bracket

    This may be too simplistic, but if it's always the first two words as a name:

    =TRIM(LEFT(SUBSTITUTE(A1, " ", REPT(" ", 50)), 100))
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Extract text to left of number of bracket

    for the second question


    =LEFT(A2;search({1,2,3,4,5,6,7,8,9},A2,1)-3)
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  4. #4
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Extract text to left of number of bracket

    try this array entered formula

    =IFERROR(LEFT(A1,MIN(IFERROR(SEARCH(CHAR({40,48,49,50,51,52,53,54,55,56,57}),A1),""))-2),"")

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

    Row\Col
    A
    B
    1
    Sebs Sensei (IRE) 8/1 Sebs Sensei
    2
    Ermine Ruby 4/1 Ermine Ruby
    3
    Allen John Flavin (FRA) 12/5 Allen John Flavin
    4
    Buffy Hoggatt 7/23 Buffy Hoggatt
    5
    Roxann L Romberg 5/6 Roxann L Romberg
    6
    Klara Grund (RU) 6/29 Klara Grund
    Last edited by AlKey; 10-22-2014 at 07:16 PM.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

+ 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] Extract text to left of nth character
    By cmb80 in forum Excel General
    Replies: 3
    Last Post: 06-16-2014, 11:09 AM
  2. [SOLVED] Extract all text to the left of a hyphen ???
    By burdo77 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 03-06-2014, 03:54 AM
  3. [SOLVED] Extracting a word to the left of an opening bracket
    By Glenn Kennedy in forum Excel General
    Replies: 5
    Last Post: 07-08-2012, 09:57 AM
  4. Extract number in the middle of text (check from right-to-left)
    By diywho in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-20-2012, 05:21 AM
  5. Using Left function to extract varying number of text
    By pvo2 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-11-2008, 01:30 AM

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