how to trim/change strings in cells

Desu Nota from Columbus

Well-known Member
Joined
Mar 17, 2011
Messages
556
I am comparing a list of names of current employees against a training log that dates back 6 years ago. If a name appears in the training log, but not in my current employees list, Column K will show FALSE. If the employee exists in both logs, the value shows TRUE.

I am matching First Name and Last Name in adjacent cells with the following formula:

=SUMPRODUCT(--('Currrent Employees'!$A$1:$A$239=B16),--('Currrent Employees'!$B$1:$B$239=C16))>0

Is there a way to circumvent this problem:

In one list the name is: Mohamed Jones

In the other list: Mohamed A. Jones

The first name is listed as Mohamed A. one place and then in the other Mohamed so the formula doesn't recognize this person.

If there was a way to trim all first names at the first space (so John C. becomes John and Anthony (Tony) becomes Anthony) this problem would be solved.
 
Try this

Excel Workbook
AB
1Mohamed S.Mohamed
2ChristopherChristopher
3ScottScott
4Allen J.Allen
5DannyDanny
6MichaelMichael
7EarnestEarnest
8Henry LeeHenry
9Riccardo J.Riccardo
10Mohamad A.Mohamad
Sheet3
 
Upvote 0

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

Forum statistics

Threads
1,224,521
Messages
6,179,291
Members
452,902
Latest member
Knuddeluff

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