Extracting Initials from Multi-Word Last Names

njpamdnc

New Member
Joined
Feb 16, 2019
Messages
34
Office Version
  1. 2007
Platform
  1. Windows
Dear Sir or Madam:

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
Joined
Feb 16, 2019
Messages
34
Office Version
  1. 2007
Platform
  1. Windows
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
 

Some videos you may like

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.

kweaver

Well-known Member
Joined
May 8, 2018
Messages
1,586
Office Version
  1. 365
  2. 2010
Modifying my earlier code to:
Code:
=LEFT(A2,1)&MID(A2,FIND(",",A2)+2,1)
 

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
48,400
Office Version
  1. 365
Platform
  1. Windows
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]
1603509421013.png
 

Watch MrExcel Video

Forum statistics

Threads
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.
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