+ Reply to Thread
Results 1 to 8 of 8

trim and find function

  1. #1
    Registered User
    Join Date
    12-06-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    14

    trim and find function

    Hi, I have a list of names with this format: john doe (jdoe) and I only need the jdoe without the parentheses. The current formula i'm using is right(trim(f2),len(trim(f2))-find("(",trim(f2))) but it's giving me jdoe).. Help please, thanks!

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

    Re: trim and find function

    Try this...

    A1 = john doe (jdoe)

    =SUBSTITUTE(MID(A1,FIND("(",A1)+1,25),")","")
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    12-06-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    14
    Quote Originally Posted by Tony Valko View Post
    Try this...

    A1 = john doe (jdoe)

    =SUBSTITUTE(MID(A1,FIND("(",A1)+1,25),")","")

    Hi, I am getting the too many argument error

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

    Re: trim and find function

    Works OK for me...
    Attached Images Attached Images
    Last edited by Tony Valko; 05-26-2015 at 09:07 PM. Reason: Why does the image get enlarged?

  5. #5
    Registered User
    Join Date
    12-06-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    14
    Quote Originally Posted by Tony Valko View Post
    Works OK for me...
    Hmm.. Still getting the same error.. I'm using excel 2010 by the way

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

    Re: trim and find function

    Here's a sample file created in Excel 2010:
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    12-06-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: trim and find function

    Ohh! I missed 1 parentheses.. I'm so sorry.. Thanks a heap for the quick reply Tony! It's working now..

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

    Re: trim and find function

    Good deal. Thanks for the feedback!

    If your question has been solved please mark the thread as being solved.

    In the menu bar above the very first post select Thread Tools, then select Mark this thread as solved.

+ 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] Using Trim Function to remove excess space in Sumif function
    By st_judeu@yahoo.com in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-08-2013, 05:10 PM
  2. Trim Characters then find Min and Max
    By brent_milne in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-03-2013, 03:50 PM
  3. Find and trim
    By surya9 in forum Excel General
    Replies: 5
    Last Post: 02-25-2010, 07:07 AM
  4. Trying to trim a trailing space char and the Trim function isn't working
    By Psychochook in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-30-2007, 11:28 PM
  5. [SOLVED] trim function-how would one incorporate the trim function within the if statement?
    By specter@doom.com in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-29-2005, 11:10 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