i have a request.  

I have names in two cells

A1 = Thomas J Jones
B1 = Helen M Jones

I want a result as follows:

if the last name is the same then the result to be
Thomas J & Helen M Jones
if not then the result to be
Thomas J Jones & Helen M JOnes

and if B1 is blank then the result to be

Thomas J Jones

i have tried a few functions but cant seem to find the right one

Hoping you can assist



You're not going to like this, but this is the answer:

=IF(B1="",A1,IF(MID(A1,FIND("{",SUBSTITUTE(A1," ","{",LEN(A1)-LEN(SUBSTITUTE(A1," ",""))))+1,255)=MID(B1,FIND("{",SUBSTITUTE(B1," ","{",LEN(B1)-LEN(SUBSTITUTE(B1," ",""))))+1,255),LEFT(SUBSTITUTE(A1," ","{",LEN(A1)-LEN(SUBSTITUTE(A1," ",""))),FIND("{",SUBSTITUTE(A1," ","{",LEN(A1)-LEN(SUBSTITUTE(A1," ",""))))-1)&" & "&B1,A1&" "&B1))

Try it out!
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here


All Answers

Answers by Expert:

Ask Experts


Bob Umlas


I`m a Microsoft Excel MVP (Most Valuable Professional) and have been since the inception of the program in 1995. I can answer every kind of Excel question except: API, Importing/exporting to other programs (powerpoint, word,...) Also check out my in-person training link at http://www.thumbtack.com/ny/new-york/excel-training/


Worked with MS Excel since version 0.99 (on the Mac!). Was contributing editor to Excellence Magazine, having written >300 articles. John Walkenbach said of me "I finally met someone who knows as much about Excel as I do."

Excellence, The Expert, Microsoft

BA in math, Hofstra University, 1965

Awards and Honors
Led sessions for the Convergence 2004-2006 seminar on Excel tips & tricks

©2017 About.com. All rights reserved.