[Solved] Sorting by middle name

My data are organized as follows: first name_middle name_last name

Assume the sample name is entered in cell A1. I have the formula for listing the first name in cell B1: =LEFT(A1,SEARCH("_",A1)-1)

QUESTION: What is the formula for listing the middle name in cell C1?

Thank you.
 
Hello Upper West Sider,
Thanks for sharing your problem with us. I understand that you want to extract the middle name from a full name. For this purpose, first, I used your mentioned formula in Cell B2 to extract the first name from Cell A2. I will use this first name output to extract the middle name.​

=LEFT(A2,SEARCH("_",A2)-1)

u6fDV8rYcAUEnfmq9bZ3unKfVTB4me-LqRE2_E7DA_UdGUovi0NX4WtZoi3InZ3cc7xWHfGMTc1bgvD31cACbDw212oBU-a72eVrJBgoBL-POSQaVAeiXojw3161ii6wpvtxNtkB9EijWNgmd-5ioLs

Afterward, I used the following formula in Cell C2 to extract the middle name.

=MID(A2,LEN(B2)+2,SEARCH("_",A2,LEN(B2)+2)-1-LEN(B2)-1)

cROKiZMcajrDB4SQ3Z3EVqTtFDtK38rpPYhtq_3DrsxxmWfGc3PqrvekYF22A6Ij8XQphicAiGizQdT_yQHvS6G8tNGMYKxn2GBtNxm70_QTzfZrcQ7765Ss2ob6QFIzeF--BAzzle8IPwJC0rXPzkM

Here, I used the MID function to extract the string from 2 characters after the first name to the next delimiter (“_”) character.​

If you require extracting the last name also, you can apply the following formula in Cell D2.

=RIGHT(A2,LEN(A2)-2-LEN(B2)-LEN(C2))

2bDOgUAm33HLuG_VnkffP5Q9l7kO0Iqbku2JuYnqPFYXmmlnGsva5Ym6-ItIGrCfrm1O8ZKdJ0vGKA8KV2sOeAgpn_31LVy6Sh_DryRs7EXmqJo8rD7fRoD_Y11zsQvA63Ueaayfmt-y1GNIN3Xnp84

To learn more about separating first name, middle name, and last name from full name, navigate the following article:
Separate First Name Middle Name and Last Name in Excel

I hope this solution resolves your problem. Let us know your feedback.

Regards,
Seemanto Saha
ExcelDemy
 
Hello Upper West Sider,
Thanks for sharing your problem with us. I understand that you want to extract the middle name from a full name. For this purpose, first, I used your mentioned formula in Cell B2 to extract the first name from Cell A2. I will use this first name output to extract the middle name.​

=LEFT(A2,SEARCH("_",A2)-1)

u6fDV8rYcAUEnfmq9bZ3unKfVTB4me-LqRE2_E7DA_UdGUovi0NX4WtZoi3InZ3cc7xWHfGMTc1bgvD31cACbDw212oBU-a72eVrJBgoBL-POSQaVAeiXojw3161ii6wpvtxNtkB9EijWNgmd-5ioLs

Afterward, I used the following formula in Cell C2 to extract the middle name.

=MID(A2,LEN(B2)+2,SEARCH("_",A2,LEN(B2)+2)-1-LEN(B2)-1)

cROKiZMcajrDB4SQ3Z3EVqTtFDtK38rpPYhtq_3DrsxxmWfGc3PqrvekYF22A6Ij8XQphicAiGizQdT_yQHvS6G8tNGMYKxn2GBtNxm70_QTzfZrcQ7765Ss2ob6QFIzeF--BAzzle8IPwJC0rXPzkM

Here, I used the MID function to extract the string from 2 characters after the first name to the next delimiter (“_”) character.​

If you require extracting the last name also, you can apply the following formula in Cell D2.

=RIGHT(A2,LEN(A2)-2-LEN(B2)-LEN(C2))

2bDOgUAm33HLuG_VnkffP5Q9l7kO0Iqbku2JuYnqPFYXmmlnGsva5Ym6-ItIGrCfrm1O8ZKdJ0vGKA8KV2sOeAgpn_31LVy6Sh_DryRs7EXmqJo8rD7fRoD_Y11zsQvA63Ueaayfmt-y1GNIN3Xnp84

To learn more about separating first name, middle name, and last name from full name, navigate the following article:
Separate First Name Middle Name and Last Name in Excel

I hope this solution resolves your problem. Let us know your feedback.

Regards,
Seemanto Saha
ExcelDemy
Thank you. This works very well. I much appreciate your assistance!

Anthony Jiga
 

Online statistics

Members online
0
Guests online
13
Total visitors
13

Forum statistics

Threads
306
Messages
1,351
Members
557
Latest member
RSntg
Top