Find letter sorounded by spaces?

CreativeUsername

Board Regular
Joined
Mar 11, 2017
Messages
52
Hi,

I have a HUGE table of data and one column is all kinds of names that need to be parsed. I found two common types of arrangement.

Last Name Mid initial first name (IE: Doe P Jane), the reverse order of that (Jane P Doe), and some variant that puts the mid initial at the end (Doe Jane P or Jane Doe P)

I'd like to be able to sort the data set to focus on all the ones where there is a single letter surrounded by spaces.

I was trying to work with =MID(Table1[@LASTNAME],SEARCH(" ",Table1[@LASTNAME])+1,2)" BUT this cuts out the first 2 letters of the middle word. (sometimes the names are full like Jane Phyllis Doe).

It would help me move through the data faster if I could filter to all items with a stand alone letter.

Any Help would be appreciated.
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Oh wait.... Not quite. Gives false negatives. if the initial is at the end of the string then it backfires. probably because there is technically not a space after the letter. Is there a way around that?
 
Upvote 0
Try this:

=OR(ISNUMBER(SEARCH("*? ? ?*",Table1[@LASTNAME])),LEFT(RIGHT(Table1[@LASTNAME],2))=" ")
 
Upvote 0
Works OK in my test workbook.
Apparently, in your dataset, it's not exactly "Smith James A".

Could you please provide answers to the following two questions:
1. What is the result of =LEN(cell_under_question)? -- Is it 13 or something else?
2. What is the result of =CODE(MID(cell_under_question,FIND("es",cell_under_question)+2,1))? -- Is it 32 or something else?
 
Upvote 0

Forum statistics

Threads
1,215,575
Messages
6,125,631
Members
449,241
Latest member
NoniJ

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