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

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
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,217,681
Messages
6,137,952
Members
450,100
Latest member
mscetr

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