Find 1st 6 matching numbers in 2 different columns

Jacki

New Member
Joined
Jul 27, 2014
Messages
17
Hi,

I have a spreadsheet that contains account numbers up to 15 digits long. In a 2nd sheet I have a shortened version of these account numbers (1st 5 numbers match). I need to be able to show which account numbers match. Can someone please help me with a formula for this?

Thanks in advance :)

Jacki
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Assume column A data contains the 15 digit number. Assume column B contains numbers (1st numbers match). You can use =exact(left(A1,5),B1). Copy down. Same numbers will produce true. Different numbers will produce false. Granted, this formula will work assuming column only contains the first five matching numbers.
 
Upvote 0
Hello Jacki, what do you want for a result, do you want the Row number of the match? Do you want a formula that just identified if there is a match for the 15 digit account number?

something like this will give you the row number of the match, and #N/A for no match:

=MATCH(LEFT(A1,5),Other Sheet Name!A:A,0)

Assumes the 15 digit Acct no starts in A1 and the 5 digit numbers on the other sheet are in column A

=IFERROR(MATCH(LEFT(A1,5),Other Sheet Name!A:A,0),"No Match") to return "No Match"

You can use VLOOKUP is a similar way to return the matching 5 digit account number.

If you are looking for the first 6 that match, you will need an array formula.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,739
Members
448,989
Latest member
mariah3

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