Index and Match Formula

Chris Waller

Board Regular
Joined
Jan 18, 2009
Messages
183
Office Version
  1. 365
Platform
  1. Windows
I have a workbook that contains about 6 different spreadsheets. One of the sheets is supposed to be a summary of all the others. The only thing in common on all the spreadsheets is a unique identifier which is in column C. From what I have read it appears that I need to use index and match type formula, but I am not having much look and have nearly pulled out the remainder of my hair.</SPAN>

On sheet one in column B there is a formula picking up the unique identifier from column B on sheet 2. What I now need to do is lift the names associated with the unique identifier which are in column A on sheet 2. Then there are several columns on sheet B after the unique identifier which also need to be displayed on sheet 1.</SPAN>

The subsequent sheets also contain the same unique identifier and I need all the data that is to the right of this identifier.</SPAN>

I have spent most of the day looking at this and not making any progress.</SPAN>

I can tell you that the data on the spreadsheets is NOT of a uniform length, and the version of Excel I am using at work is 2002. TIA</SPAN>
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Your question isn't clear to me but I think this will help. I typed data into sheet 2, and extract it to sheet1. with the unique identifier in different order.

Excel Workbook
ABCDEF
1NameUniqueIDTypeMoreDataMoreDataB
2Joe12mMD1MDb1
3Bob14mMD2MDb2
4Tane34mMD3MDb3
5Jane56fMD4MDb4
Sheet2



Excel Workbook
ABCDE
1nameUniqueIDTypeMoreDataMoreDataB
2Joe12mMD1MDb1
3Jane56fMD4MDb4
4Tane34mMD3MDb3
5Bob14mMD2MDb2
Sheet1
 
Upvote 0
Your question isn't clear to me but I think this will help. I typed data into sheet 2, and extract it to sheet1. with the unique identifier in different order.

Sheet2

*ABCDEF
*
Joe*mMD1MDb1
Bob*mMD2MDb2
Tane*mMD3MDb3
Jane*fMD4MDb4

<COLGROUP><COL style="WIDTH: 30px; FONT-WEIGHT: bold"><COL style="WIDTH: 64px"><COL style="WIDTH: 64px"><COL style="WIDTH: 64px"><COL style="WIDTH: 64px"><COL style="WIDTH: 64px"><COL style="WIDTH: 77px"></COLGROUP><TBODY>
[TD="bgcolor: #cacaca, align: center"]1[/TD]
[TD="align: center"]Name[/TD]

[TD="align: center"]UniqueID[/TD]
[TD="align: center"]Type[/TD]
[TD="align: center"]MoreData[/TD]
[TD="align: center"]MoreDataB[/TD]

[TD="bgcolor: #cacaca, align: center"]2[/TD]

[TD="align: right"]12[/TD]

[TD="bgcolor: #cacaca, align: center"]3[/TD]

[TD="align: right"]14[/TD]

[TD="bgcolor: #cacaca, align: center"]4[/TD]

[TD="align: right"]34[/TD]

[TD="bgcolor: #cacaca, align: center"]5[/TD]

[TD="align: right"]56[/TD]

</TBODY>


Excel tables to the web >> Excel Jeanie HTML 4


Sheet1

*ABCDE
name
JoemMD1MDb1
JanefMD4MDb4
TanemMD3MDb3
BobmMD2MDb2

<COLGROUP><COL style="WIDTH: 30px; FONT-WEIGHT: bold"><COL style="WIDTH: 72px"><COL style="WIDTH: 72px"><COL style="WIDTH: 72px"><COL style="WIDTH: 72px"><COL style="WIDTH: 77px"></COLGROUP><TBODY>
[TD="bgcolor: #cacaca, align: center"]1[/TD]

[TD="align: center"]UniqueID[/TD]
[TD="align: center"]Type[/TD]
[TD="align: center"]MoreData[/TD]
[TD="align: center"]MoreDataB[/TD]

[TD="bgcolor: #cacaca, align: center"]2[/TD]

[TD="align: right"]12[/TD]

[TD="bgcolor: #cacaca, align: center"]3[/TD]

[TD="align: right"]56[/TD]

[TD="bgcolor: #cacaca, align: center"]4[/TD]

[TD="align: right"]34[/TD]

[TD="bgcolor: #cacaca, align: center"]5[/TD]

[TD="align: right"]14[/TD]

</TBODY>

Spreadsheet Formulas
CellFormula
A2=INDEX(Sheet2!$A$1:$F$5,MATCH($B2,Sheet2!$C$1:$C$5,0),MATCH(A$1,Sheet2!$A$1:$F$1,0))
C2=INDEX(Sheet2!$A$1:$F$5,MATCH($B2,Sheet2!$C$1:$C$5,0),MATCH(C$1,Sheet2!$A$1:$F$1,0))
D2=INDEX(Sheet2!$A$1:$F$5,MATCH($B2,Sheet2!$C$1:$C$5,0),MATCH(D$1,Sheet2!$A$1:$F$1,0))
E2=INDEX(Sheet2!$A$1:$F$5,MATCH($B2,Sheet2!$C$1:$C$5,0),MATCH(E$1,Sheet2!$A$1:$F$1,0))
A3=INDEX(Sheet2!$A$1:$F$5,MATCH($B3,Sheet2!$C$1:$C$5,0),MATCH(A$1,Sheet2!$A$1:$F$1,0))
C3=INDEX(Sheet2!$A$1:$F$5,MATCH($B3,Sheet2!$C$1:$C$5,0),MATCH(C$1,Sheet2!$A$1:$F$1,0))
D3=INDEX(Sheet2!$A$1:$F$5,MATCH($B3,Sheet2!$C$1:$C$5,0),MATCH(D$1,Sheet2!$A$1:$F$1,0))
E3=INDEX(Sheet2!$A$1:$F$5,MATCH($B3,Sheet2!$C$1:$C$5,0),MATCH(E$1,Sheet2!$A$1:$F$1,0))
A4=INDEX(Sheet2!$A$1:$F$5,MATCH($B4,Sheet2!$C$1:$C$5,0),MATCH(A$1,Sheet2!$A$1:$F$1,0))
C4=INDEX(Sheet2!$A$1:$F$5,MATCH($B4,Sheet2!$C$1:$C$5,0),MATCH(C$1,Sheet2!$A$1:$F$1,0))
D4=INDEX(Sheet2!$A$1:$F$5,MATCH($B4,Sheet2!$C$1:$C$5,0),MATCH(D$1,Sheet2!$A$1:$F$1,0))
E4=INDEX(Sheet2!$A$1:$F$5,MATCH($B4,Sheet2!$C$1:$C$5,0),MATCH(E$1,Sheet2!$A$1:$F$1,0))
A5=INDEX(Sheet2!$A$1:$F$5,MATCH($B5,Sheet2!$C$1:$C$5,0),MATCH(A$1,Sheet2!$A$1:$F$1,0))
C5=INDEX(Sheet2!$A$1:$F$5,MATCH($B5,Sheet2!$C$1:$C$5,0),MATCH(C$1,Sheet2!$A$1:$F$1,0))
D5=INDEX(Sheet2!$A$1:$F$5,MATCH($B5,Sheet2!$C$1:$C$5,0),MATCH(D$1,Sheet2!$A$1:$F$1,0))
E5=INDEX(Sheet2!$A$1:$F$5,MATCH($B5,Sheet2!$C$1:$C$5,0),MATCH(E$1,Sheet2!$A$1:$F$1,0))

<TBODY>
</TBODY>

<TBODY>
</TBODY>


Excel tables to the web >> Excel Jeanie HTML 4


Excel Jeanie,

Thanks for the help. Perhaps you can push me in the right direction? When I modyfied your table and entered my own data. the Index MAtch formula appeared to work, however, when I created my own 5x4 Spreadsheet and used your formula all I got was a load of old #N/As. I am obviously missing something. Do I have to invoke some kind of add-in or, for the INDEX MATCH formula to work do I have to give a range name? As I have never seen one of these types of formulae before I do not know how they work, therfore I cannot amend it to get it to work.</SPAN>

Please note that I only have access to Office XP at work.</SPAN>
 
Upvote 0
Post the formula that you tried and returned #NA. You don't need any add ins for index/match to work, and you can use either named ranges if you want, or you can put the range in the formula. I am not Jeanie. Jeanie is a software to post the sheet to the web. I can't look at this again for 3-4 days
 
Upvote 0
I have eventually managed to get the formula to work, I don't know what I was doing wrong, perhaps it was just one of those days. I still get a lot of #N/A where there is no data which in my opinion does not look very professional. I have tried modifying the formula as per several posts on the Internet, but at the moment to no avail.
 
Upvote 0

Forum statistics

Threads
1,223,246
Messages
6,170,996
Members
452,373
Latest member
TimReeks

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