+ Reply to Thread
Results 1 to 2 of 2

Extracting just the last name in a text string

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    06-21-2006
    MS-Off Ver
    2007
    Posts
    141

    Extracting just the last name in a text string

    I have a worksheet where I need to enter a physicians name, e.g. Joe Blow, MD. Then there is another worksheet that addresses the same physician, but as Dr. Blow. Is there a formula I could use that will allow me to not have to re-enter the Dr.'s last name in the second cell; one that will extract just the last name from the first worksheet? The good thing is, there is always a comma MD (", MD") after the name in the first worksheet.

    Any ideas?

  2. #2
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,527
    Hi there,

    See if changing the sheet reference (Sheet1) and the cell reference (A2) for your specific needs in the following formula does the job:

    =MID(Sheet1!A2,SEARCH(" ",Sheet1!A2)+1,SEARCH(", ",Sheet1!A2)-1-SEARCH(" ",Sheet1!A2))

    HTH

    Robert

+ 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