Compare first 7 characters of COL A with COL B or COL C

dahvaio

New Member
Joined
Apr 6, 2005
Messages
6
I have 3 columns and could not figure out how to compare them using only the first 7 characters. I need to compare all entries in COL A with COL B and then with COL C.

In COL E it should put the name that matched in COL B
In COL F it should put the name that matched in COL C

Here is the current formula that I am using on COL E but I do not know ho to make it search only a set number of characters:

=IF(ISERROR(MATCH(A2,$B$3:$B$60000,0)),"",A3)

For example:

COL A:
acarter
BERKLEYPL
BOLTONJM
EBOSTON
FHERSHEY
BRAZILDD
BREWERMM


COL B:
ABANIELHE
ADELEON
AGUIRRELC
AGUILARK1
FHERSHEY
AKFOLEY
ALANGENW

COL C:
acarter
AGUILARK1
AKAAIAWA
AKavin
ALANIZDO
Alcortao
ALEXANDERCA
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Something like this?

=IF(ISNUMBER(MATCH(LEFT($A1,7),LEFT(B$1:B$7,7),0)),$A1,"")

confirmed with CTRL+SHIFT+ENTER not just ENTER and then copied down and right .

adjust ranges to suit and reconfirm with CSE key combo.
 
Upvote 0

Forum statistics

Threads
1,214,935
Messages
6,122,337
Members
449,078
Latest member
skydd

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