Extracting first initial of last name

bearcub

Well-known Member
Joined
May 18, 2005
Messages
734
Office Version
  1. 365
  2. 2013
  3. 2010
  4. 2007
Platform
  1. Windows
I need to create a field that extracts the first initial from the last name so I can sort members alphabetically by last name. I'm using the Left function which does the trick but I ran into a situation where someone has a maiden name in front of the last name so all the is being returned are the beginning and ending hyphens.

Example
last name: Smith
Result : -S-
This is what I expected to happen - this is what I need


last name: (PERRY) TORRANO
result now: - -
needed : -T-
How do I get the formula to pick up the T instead of the " "?

The left function is ignoring the "(" and replacing it with a " ".

The majority of the people just have a last name. Is there a workaround for this problem?

Thank you for your help.
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Try this:
Code:
IIf(InStr([Buyer],")")>0,Mid([Buyer],InStr([Buyer],")")+2,1),Left([Buyer],1))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,305
Members
452,633
Latest member
DougMo

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
Back
Top