Index Match

hajiali

Well-known Member
Joined
Sep 8, 2018
Messages
626
Office Version
  1. 2016
Platform
  1. Windows
[TABLE="width: 500"]
<tbody>[TR]
[TD]1[/TD]
[TD]MIKE[/TD]
[TD]HAT[/TD]
[TD]JIM[/TD]
[TD]BAT[/TD]
[TD]JAMES[/TD]
[TD]BAT[/TD]
[TD]BOB[/TD]
[TD]HAT[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]BOB[/TD]
[TD]BAT[/TD]
[TD]JAMES[/TD]
[TD]HAT[/TD]
[TD]BILL[/TD]
[TD]HAT[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]JIM[/TD]
[TD]HAT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]MIKE[/TD]
[TD]BAT[/TD]
[TD]JAMES[/TD]
[TD]HAT[/TD]
[TD]BOB[/TD]
[TD]BAT[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]BILL[/TD]
[TD]HAT[/TD]
[TD]MIKE[/TD]
[TD]HAT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

above table Column A is day of month column followed by names than code to the right for each person. on another sheet I have the list of all the names in cell (A2) down. In cell (A1) I input Day of Month. based on the (A1), in column B i want to it pull the code next to each name that appears for that day of month. Ex. If I put 2 in cell (A1) results should be below.

[TABLE="width: 500"]
<tbody>[TR]
[TD]2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]MIKE
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]JIM[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]JAMES[/TD]
[TD]HAT[/TD]
[/TR]
[TR]
[TD]BILL[/TD]
[TD]HAT[/TD]
[/TR]
[TR]
[TD]BOB[/TD]
[TD]BAT[/TD]
[/TR]
[TR]
[TD]PHILIP[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

IF I change cell (A1) to 4 the results would read:

[TABLE="width: 500"]
<tbody>[TR]
[TD]4[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]MIKE[/TD]
[TD]BAT[/TD]
[/TR]
[TR]
[TD]JIM[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]JAMES[/TD]
[TD]HAT[/TD]
[/TR]
[TR]
[TD]BILL[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]BOB[/TD]
[TD]HAT[/TD]
[/TR]
[TR]
[TD]PHILIP[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Re: Index Match Help

With data like

Book1
ABCDEFGHI
1
21MIKEHATJIMBATJAMESBATBOBHAT
32BOBBATJAMESHATBILLHAT
43JIMHAT
54MIKEBATJAMESHATBOBBAT
65BILLHATMIKEHAT
Sheet1


try


Book1
AB
14
2MIKEBAT
3JIM
4JAMESHAT
5BILL
6BOBBAT
7PHILIP
Sheet2
Cell Formulas
RangeFormula
B2=IFERROR(INDEX(Sheet1!$C$2:$I$6,$A$1,MATCH(A2,INDEX(Sheet1!$B$2:$I$6,$A$1,0),0)),"")
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

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