Extracting Initials from Multi-Word Last Names

njpamdnc

New Member

My name is Robert, and I am a middle school math teacher who is requesting your assistance with solving a frustrating problem. I have provided you with two scenarios for extracting initials from student names.

=IF(OR(COUNTIF(B101,"*SE*"),COUNTIF(B101,"*ESL*")),A101,"") gives me the result of "BP" for Budathoki, Pranik

=IF(OR(COUNTIF(B100,"*SE*"),COUNTIF(B100,"*ESL*")),A100,"") gives me the result of "BN" for Berrocales Noriega, Jacklyz

However, I want the result for Berrocales Noriega, Jacklyz to be "BJ". In other words, I want a formula to pull the first initial from the leftmost name in a field skipping through x amount of names until the formula is ready to pull the first letter of the first name. Any assistance you can provide will be greatly appreciated.

Sincerely,
Robert

njpamdnc

New Member
I don't understand
Post#4 contain your example (very poor example) and Power Query (Get&Transform) M code for that
what do you want more?
btw. there is no any worksheet formulas

I suggest you to update your profile about Excel version and OS
Ok...Thanks

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

sandy666

Banned - Rules violations
Ok...Thanks
You are welcome
As I can see you've XL2007 which is not supported by Power Query
Have a nice day

kweaver

Well-known Member
Modifying my earlier code to:
Code:
``=LEFT(A2,1)&MID(A2,FIND(",",A2)+2,1)``

Peter_SSs

MrExcel MVP, Moderator
Another way would have been

Excel Formula:
``=LEFT(REPLACE(A2,2,FIND(",",A2),""),2)``

@kweaver
In case you were not aware, we now have specific tags for worksheet formulas: [CODE=xls][/CODE]

Replies
4
Views
1K
Replies
5
Views
2K
Replies
8
Views
689
Replies
3
Views
4K
Replies
6
Views
1K

1,127,758
Messages
5,626,686
Members
416,200
Latest member
Pulsar3000

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.

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

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