Extracting First Initial of First Name & Concatenating to Last Name

Gomesy

New Member
Joined
Oct 16, 2005
Messages
31
Good Morning from the Windy City of Chicago! It's a balmy 40 below zero with the wind chills today. A nice day to stay inside and learn more about working with names in Excel.

I am currently running Excel 2010 and am more than an intermediate user.

I am creating charts for a list of doctors taken from a drop-down box (validation) where their names appear as Last Name, First Name and are converted to “Dr. Last Name” in the chart title.

The formula I am using works fine however I have encountered a problem where a facility has several instances where doctors have the same last name.

I have the list of duplicate last names (there are about 5 pairs) and wish to write a “nested if” statement that puts the first initial of the first name followed by a period, in between Dr. and the Last Name when one of these duplicate doctor names are identified. i.e. Dr. J. Doe and Dr. R. Doe taken from Doe, John & Doe, Robert.

Can this be accomplished without too much difficulty?

Thank you!
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Snakehips

Well-known Member
Joined
May 17, 2009
Messages
5,612
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Richard,

Welcome to MrExcel.


Can you not treat all doctor names the same and express with first initial?

eg ="Dr. " & MID(A1,FIND(",",A1,1)+2,1)&". " &LEFT(A1,FIND(",",A1,1)-1)

Or is it only the list of duplicates that includes a first name?
 

etaf

Well-known Member
Joined
Oct 24, 2012
Messages
5,999
Office Version
  1. 365
Platform
  1. MacOS
if you want to extract
do they all appear after the first space in the string ?

if so, then you could use

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

which will extract the first character after a space
and then you can use concatenate to your conversion
 

Forum statistics

Threads
1,172,168
Messages
5,879,432
Members
433,430
Latest member
lukerjordan7

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top