Index/Match to Right 5 characters - Array

cleokep

New Member
Joined
Jul 15, 2014
Messages
19
Hi, wonder if anyone can help with this Index/Match based on Matching Right 5 characters?

Example Data in Sheet 1:
A
B
C
Name
ID
Location
Mark Smith
41264
Mike Smith
73894

<tbody>
</tbody>

Example Data in Sheet 2:
A
B
P
BH
Location
Address
Department1
Department45
Baltimore
100 Sycamore St
Production:41264
Kansas City
400 Main St
Engineering:73894

<tbody>
</tbody>

Here is my formula typed into Sheet 1, Column C that doesn't seem to work:
{=INDEX(Sheet2!$A$2:$A$500,MATCH(B2,RIGHT(Sheet2!$P$2:$BH$500,5),0))}

Results I want to see in Sheet 1:
A
B
C
Name
ID
Location
Mark Smith
41264
Baltimore
Mike Smith
73894
Kansas City

<tbody>
</tbody>

Thanks for any insight you can give!
 

Some videos you may like

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

skywriter

Well-known Member
Joined
Feb 15, 2014
Messages
1,642
See if this works:

Code:
=LOOKUP(TEXT(B2,0),RIGHT(Sheet2!$P$2:$BH$500,5),Sheet2!$A$2:$A$500)
 

Watch MrExcel Video

Forum statistics

Threads
1,109,444
Messages
5,528,799
Members
409,835
Latest member
Mafu1267

This Week's Hot Topics

  • Change military grades into rank
    Afternoon all Need help with formula that will change military rank (i.e. 1, 2, 3 into Amn, A1C, SrA). Running IF formula that does not work...
  • VBA COUNTIF SOLUTION
    Hi The following are the errors spread across the several columns from E to Q ie. 13 columns across several sheets with more than 500 rows per...
  • INSERT ROW WITH SPECIFIS TEXT IN A COLUMN
    Hi All! How can identify that that the row to be inserted has to be inserted before 1st row with specific text in column F. If I record the...
  • Auto-Create a monthly Sign in sheet for preschool students
    The image below is what each page looks like. Above is space for the "Child Name" "Month" "Class" School days are obviously Monday-Friday but...
  • VBA vlookup multiple results
    Hi folks, Hopefully someone out there can help. I have a list to vlookup which works (ish). the lookup only picks up the first instance of the...
  • Extract values for earliest/latest times
    I am trying to put together a formula to get the earliest start time, the latest end time from column A for each person in Column B-F without the...
Top