|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
I'm looking for a formula to extract all the text before the last name in a cell
Hello,
I'm trying to separate out the first and last names in a spreadsheet. I used a formula to extract the last name. Now I just want to extract all the text that is to the left of the space before the last name. Is this possible? The text to the left of the space before the last name is totally inconsistent - - and that's ok for my purposes now. Thanks for your help! |
#2
|
||||
|
||||
Try:
=LEFT(A1,FIND("‡",SUBSTITUTE(A1," ","‡",LEN(A1)-LEN(SUBSTITUTE(A1," ",""))))-1)
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Thank you so much, Paul! This works perfectly!
|
#4
|
|||
|
|||
Otherwise the Text to Columns function will separate text in a cell to multiple columns.
|
#5
|
||||
|
||||
True, but that's not much good when (as in this case) the desired output (which could be multiple given names, initials & honorifics) are all required in a single column.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to extract text from a cell and preserve special formatting? | epid011 | Word VBA | 2 | 04-04-2014 04:54 PM |
Extract Min and highlight cell from source | LeilaniMerle | Excel | 3 | 01-26-2014 11:05 PM |
extract text with formula | s7y | Excel | 7 | 06-05-2013 06:18 AM |
Change formula cell range based on cell value | Scoth | Excel | 4 | 10-25-2012 07:51 AM |
Formula that references cell with text in different workbook | no1texan | Excel | 3 | 07-17-2012 05:58 AM |