Excel User Group
Microsoft Excel blogs, forums, files. Read, ask questions, provide answers.

Nesting "RIGHT", "MID", and "FIND" in a formula

Latest post Tue, Jun 17 2008 9:53 AM by Garyb444. 18 replies.
  • Thu, Jun 12 2008 3:22 AM In reply to

    Re: Nesting "RIGHT", "MID", and "FIND" in a formula

    You are entitled to your opinion, but I disagree on each point. The formula is obtuse enough that the minor changes that you made will not be the difference between understandingt and not understanding.

     

    Regards

    Bob

    • Post Points: 5
  • Thu, Jun 12 2008 1:17 PM In reply to

    • Garyb444
    • Top 75 Contributor
    • Joined on Thu, Jun 12 2008
    • Auburn, CA, USA
    • Posts 4
    • Points 84

    Re: Nesting "RIGHT", "MID", and "FIND" in a formula

     Here's my contribution:

    =TRIM(RIGHT((SUBSTITUTE(C2," ","                                                                                    ")),45))

    Not as sophisticated as what you all have done, but it does work.

    BTW, just joined your forum. Thanks for making this available, I really appreciate it!  Am a long time user of Excel; just started writing macros about a year ago.  Will be taking a course in VB in a few weeks to increase my skills, and am really excited about that!

    Glad to be here.

    Gary

     

     

     

    • Post Points: 21
  • Mon, Jun 16 2008 11:51 PM In reply to

    • hrlngrv
    • Top 10 Contributor
    • Joined on Thu, Jan 17 2008
    • somewhere in the western US
    • Posts 67
    • Points 1,055

    Re: Nesting "RIGHT", "MID", and "FIND" in a formula

    Garyb444:
    =TRIM(RIGHT((SUBSTITUTE(C2," ","                                                                                    ")),45))

    Not as sophisticated as what you all have done, but it does work.

    It works when the last token (substring without whitespace) is 45 or fewer characters in length, fails when it's longer.

     

    • Post Points: 21
  • Tue, Jun 17 2008 9:53 AM In reply to

    • Garyb444
    • Top 75 Contributor
    • Joined on Thu, Jun 12 2008
    • Auburn, CA, USA
    • Posts 4
    • Points 84

    Re: Nesting "RIGHT", "MID", and "FIND" in a formula

    Yes, you're right.  I could increase that number to at least 75 and it would still work( as long as it doesn't exceed the number of spaces in the middle), but I normally use this to extract last names, and I haven't found any that would be as long as 45 characters.  

    Thanks,

    Gary

     

     

    • Post Points: 5
Page 2 of 2 (19 items) < Previous 1 2 | RSS
Copyright Excel User Group and the relevant contributors, 2008. All Trade Marks acknowledged. This site is a peer-to-peer site and NOT affiliated in any way to Microsoft Corp. All rights reserved.