+ Reply to Thread
Results 1 to 12 of 12

Return characters after first number in a cell

  1. #1
    Registered User
    Join Date
    05-19-2013
    Location
    New York
    MS-Off Ver
    Excel for Mac 2011
    Posts
    6

    Return characters after first number in a cell

    Hi everyone,

    After a significant amount of searching, I'm still trying to figure out how to return all of the characters in a cell that appear to the right of the first number. Here are two examples of typical cells:

    Grammas v. Lockwood Associates, LLC, 944 N.Y.S.2d 623 (App. Div. 2nd Dept. 2012).

    AT&T Advertising, L.P. v. Winningham, 280 P.3d 360 (Okla. App. 2012)

    Essentially, I want to split the case name from the citation, so if I can extract everything after the first number, I'm in good shape.

    Thanks!

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Return characters after first number in a cell

    hi sgdnyc, welcome to the forum. you could probably give us the end result you want. after first number for the first eg is?
    44 N.Y.S.2d 623 (App. Div. 2nd Dept. 2012).
    if so,
    =MID(A1,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A1&"0123456789"))+1,LEN(A1))

    if it's 1st number & after:
    =MID(A1,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A1&"0123456789"))+1,LEN(A1))

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Return characters after first number in a cell

    I'm assuming the results from the samples should be:

    N.Y.S.2d 623 (App. Div. 2nd Dept. 2012)
    P.3d 360 (Okla. App. 2012)

    Will that first set of digits ever have leading zeros like:

    044
    004
    000

    Is that first set of digits always 3 digits long?

    It would help us if you could post SEVERAL representative samples and show us what the results should be.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    05-19-2013
    Location
    New York
    MS-Off Ver
    Excel for Mac 2011
    Posts
    6

    Re: Return characters after first number in a cell

    Hey guys,

    Thanks for your help and sorry for not being more specific. Here is the example again and the result I'm seeking.

    Example:

    Grammas v. Lockwood Associates, LLC, 944 N.Y.S.2d 623 (App. Div. 2nd Dept. 2012).

    Result:

    944 N.Y.S.2d 623 (App. Div. 2nd Dept. 2012).

    Benishiryo, I used your formula and made a small change to get the right result.

    =MID(C3,MIN(FIND({0,1,2,3,4,5,6,7,8,9},C3&"0123456789")),LEN(C3))

    With all that said, if I wanted to extract everything BEFORE the first number, how would I change that formula?

    Thanks again in advance.

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Return characters after first number in a cell

    Quote Originally Posted by sgdnyc View Post
    =MID(C3,MIN(FIND({0,1,2,3,4,5,6,7,8,9},C3&"0123456789")),LEN(C3))

    With all that said, if I wanted to extract everything BEFORE the first number, how would I change that formula?
    Like this:

    =LEFT(C3,MIN(FIND({0,1,2,3,4,5,6,7,8,9},C3&"0123456789"))-2)

  6. #6
    Registered User
    Join Date
    05-19-2013
    Location
    New York
    MS-Off Ver
    Excel for Mac 2011
    Posts
    6

    Re: Return characters after first number in a cell

    You guys are good. Thanks for your help. Will save me a LOT of time.

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Return characters after first number in a cell

    You're welcome. Thanks for the feedback!

  8. #8
    Registered User
    Join Date
    05-19-2013
    Location
    New York
    MS-Off Ver
    Excel for Mac 2011
    Posts
    6

    Re: Return characters after first number in a cell

    Hey, sorry to trouble you again, Tony, but am trying to figure out an efficient way to remove a parenthetical from cells.

    Here's what I have in thousands of rows:

    Lee v. Brown, No. 3:08-CV-01206 CSH, 2009 WL 3157542 (D. Conn. Sept. 25, 2009) (stating that rule that partnership has citizenship of each of its partners for purposes of diversity jurisdiction applies to LLPs).

    In the above, I want to remove the second parenthetical so I end up with this:

    Lee v. Brown, No. 3:08-CV-01206 CSH, 2009 WL 3157542 (D. Conn. Sept. 25, 2009)

    Is there a formula that would identify the second "(", delete it and everything after it? Or would it work to insert a symbol such as a "@" after the first ")" and then run a second formula that removes everything after the "@"?

    Thanks in advance.

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Return characters after first number in a cell

    Find and replace ") (*" sans quotes with )
    Last edited by shg; 05-19-2013 at 05:49 PM.
    Entia non sunt multiplicanda sine necessitate

  10. #10
    Registered User
    Join Date
    05-19-2013
    Location
    New York
    MS-Off Ver
    Excel for Mac 2011
    Posts
    6

    Re: Return characters after first number in a cell

    Is there a way to replace only the second "(" that appears in the string with a "*"?

  11. #11
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Return characters after first number in a cell

    My suggestion works for your example. Is this for something else?

  12. #12
    Registered User
    Join Date
    05-19-2013
    Location
    New York
    MS-Off Ver
    Excel for Mac 2011
    Posts
    6

    Re: Return characters after first number in a cell

    You're absolutely right, SHG. Apologies, I misunderstood at first. Thanks for your help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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