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

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

NBVC

Well-known Member
Joined
Aug 31, 2005
Messages
5,828
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.
 

Forum statistics

Threads
1,141,023
Messages
5,703,801
Members
421,318
Latest member
cg_cartoonexcel

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