Index and Match Function - Across Header and Down Rows

jumpmanz5

New Member
Joined
Dec 3, 2007
Messages
14
Hi All,

I'm hoping I can get a little help on indexing and matching. I've been working to try and sort this for about a week now and haven't been successful at all. I can get the information to pull in for the first company, but when i can the selection criteria i lose it.

I have two sheets in my excel file. Sheet 1 contains a list of labor categories (Column A), a cell to enter a company number (B2) (that name will then display in (B3). Sheet 2 contains that same listed of labor categories (Column A) and the in a row (row 1) a list of companies by name (Company A, B, C, etc). Each company has a number above it.

What I'm looking to have happen... when i enter a company number from Sheet 2 into Sheet 1 cell B2 that rows in Column B (B5:B14) are populated with the hourly rates from Sheet 2 for the corresponding labor category.

Example: If i enter a 1, in B2 on Sheet 1

On Sheet 1 in Column B all the labor rates from Sheet 2 will populate in that column. The first being $62.65, $72.92, $100.81 and so on down the column.

Any help is greatly appreciate. I think this is an array type formula, but i just cannot get anything to work.


<a href="http://sv.tinypic.com?ref=206fvns" target="_blank"><img src="http://i65.tinypic.com/206fvns.jpg" border="0" alt="Image and video hosting by TinyPic"></a>

<a href="http://sv.tinypic.com?ref=2ufzwvk" target="_blank"><img src="http://i67.tinypic.com/2ufzwvk.jpg" border="0" alt="Image and video hosting by TinyPic"></a>
 

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).
If i understood you, Try Below Formula: and next time please try to copy and paste example sheet instead of JPG.

=INDEX(Sheet2!$A$3:$D$10,MATCH(A7,Sheet2!$A$3:$A$10,0),MATCH($B$4,Sheet2!$A$3:$D$3,0))


Sheet 1
AB
Enter Subcontratr….>1
Company Name
Labor Ceteogry
AA11
BB22
CC33
DD44
EE55
FF66

<colgroup><col><col></colgroup><tbody>
</tbody>



<colgroup><col><col></colgroup><tbody>
</tbody>
Sheet 2
ABCD
123
Concatenated NameCompany ACompany BCompany C
AA117785
BB227886
CC337987
DD448088
EE558189
FF668290


<colgroup><col><col span="3"></colgroup><tbody>
</tbody>
 
Upvote 0
If i understood you, Try Below Formula: and next time please try to copy and paste example sheet instead of JPG.

=INDEX(Sheet2!$A$3:$D$10,MATCH(A7,Sheet2!$A$3:$A$10,0),MATCH($B$4,Sheet2!$A$3:$D$3,0))


Sheet 1
AB
Enter Subcontratr….>1
Company Name
Labor Ceteogry
AA11
BB22
CC33
DD44
EE55
FF66

<colgroup><col><col></colgroup><tbody>
</tbody>



<colgroup><col><col></colgroup><tbody>
</tbody>
Sheet 2
ABCD
123
Concatenated NameCompany ACompany BCompany C
AA117785
BB227886
CC337987
DD448088
EE558189
FF668290


<colgroup><col><col span="3"></colgroup><tbody>
</tbody>



Hi ChandraAmgain,

Really appreciate the suggested, but i was not able to get it to work (probably me). I installed the Mr.ExcelHtml maker, so pasting these two table i hope should make it easier to understanding what i'm actually tracking to do.

The first table is the main sheet that i want information (labor rates) pulled into from the second table. What i'm looking to do is input a Subcontractor # (C1 - Table 1) from the Subcontractor #s in second table (ROW 1 - Columns C, D, E (in black) .

When i insert the number it auto pulls the hourly rates for the company. So if i input 1, it would pull all the labor rates from Company A in the second table in column C to the corresponding labor categories (Column B in both tables) in the first table.

If i entered 2, it would pull labor rates for Company B and so on. My actual file contains over 95 company names and 289 labor categories for each company, so you can somewhat see why it would be nice to simply input 1 number and get all the rate for that company vice sorting for them.

Again, i appreciate the help. Thank You





Excel 2012
ABCDE
11<-Enter Subcontract # from SubktLaborRates Sheet
2No.Concatenated NameCompany A
31Enterprise IT Administration Database Administrator Developmental
42Enterprise IT Administration Database Administrator Full Performance
53Enterprise IT Administration Database Administrator Senior
64Enterprise IT Administration Database Administrator Expert
75Enterprise IT Administration Database Administrator Subject Matter Expert
86Enterprise IT Administration Database Administrator Manager
97Enterprise IT Administration Systems Administrator Developmental
108Enterprise IT Administration Systems Administrator Full Performance
119Enterprise IT Administration Systems Administrator Senior
1210Enterprise IT Administration Systems Administrator Expert
CompetitiveRange





Excel 2012
ABCDE
1123
2No.Concatenated NameCompany ACompany BCompnay C
31Enterprise IT Administration Database Administrator Developmental$62.65$73.59$74.94
42Enterprise IT Administration Database Administrator Full Performance$72.92$90.28$88.39
53Enterprise IT Administration Database Administrator Senior$100.81$118.22$105.68
64Enterprise IT Administration Database Administrator Expert$109.46$131.36$124.90
75Enterprise IT Administration Database Administrator Subject Matter Expert$130.78$136.26$151.80
86Enterprise IT Administration Database Administrator Manager$133.25$138.03$151.80
97Enterprise IT Administration Systems Administrator Developmental$67.79$69.55$73.34
108Enterprise IT Administration Systems Administrator Full Performance$74.57$79.76$83.58
119Enterprise IT Administration Systems Administrator Senior$89.40$103.58$97.99
1210Enterprise IT Administration Systems Administrator Expert$108.51$119.58$121.06
SubktrLaborRates
 
Last edited:
Upvote 0
This should be what you have, if you put number 1,2 or 3 in cell C1 the company name and values should change to whatever you have in the SubktrLaborRates sheet.
CompetitiveRange

*ABCD
1**1<-Enter Subcontract # from SubktLaborRates Sheet
2No.Concatenated NameCompany A*
31Enterprise IT Administration Database Administrator Developmental$62.65*
42Enterprise IT Administration Database Administrator Full Performance$72.92*
53Enterprise IT Administration Database Administrator Senior$100.81*
64Enterprise IT Administration Database Administrator Expert$109.46*
75Enterprise IT Administration Database Administrator Subject Matter Expert$130.78*
86Enterprise IT Administration Database Administrator Manager$133.25*
97Enterprise IT Administration Systems Administrator Developmental$67.79*
108Enterprise IT Administration Systems Administrator Full Performance$74.57*
119Enterprise IT Administration Systems Administrator Senior$89.40*
1210Enterprise IT Administration Systems Administrator Expert$108.51*

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:29px;"><col style="width:481px;"><col style="width:77px;"><col style="width:64px;"></colgroup><tbody>
</tbody>

Spreadsheet Formulas
CellFormula
C2=HLOOKUP($C$1,SubktrLaborRates!$C$1:$E$2,2,0)
C3=INDEX(SubktrLaborRates!$A$3:$E$12,MATCH(A3,SubktrLaborRates!$A$3:$A$12,0),MATCH($C$2,SubktrLaborRates!$A$2:$E$2,0))
C4=INDEX(SubktrLaborRates!$A$3:$E$12,MATCH(A4,SubktrLaborRates!$A$3:$A$12,0),MATCH($C$2,SubktrLaborRates!$A$2:$E$2,0))
C5=INDEX(SubktrLaborRates!$A$3:$E$12,MATCH(A5,SubktrLaborRates!$A$3:$A$12,0),MATCH($C$2,SubktrLaborRates!$A$2:$E$2,0))
C6=INDEX(SubktrLaborRates!$A$3:$E$12,MATCH(A6,SubktrLaborRates!$A$3:$A$12,0),MATCH($C$2,SubktrLaborRates!$A$2:$E$2,0))
C7=INDEX(SubktrLaborRates!$A$3:$E$12,MATCH(A7,SubktrLaborRates!$A$3:$A$12,0),MATCH($C$2,SubktrLaborRates!$A$2:$E$2,0))
C8=INDEX(SubktrLaborRates!$A$3:$E$12,MATCH(A8,SubktrLaborRates!$A$3:$A$12,0),MATCH($C$2,SubktrLaborRates!$A$2:$E$2,0))
C9=INDEX(SubktrLaborRates!$A$3:$E$12,MATCH(A9,SubktrLaborRates!$A$3:$A$12,0),MATCH($C$2,SubktrLaborRates!$A$2:$E$2,0))
C10=INDEX(SubktrLaborRates!$A$3:$E$12,MATCH(A10,SubktrLaborRates!$A$3:$A$12,0),MATCH($C$2,SubktrLaborRates!$A$2:$E$2,0))
C11=INDEX(SubktrLaborRates!$A$3:$E$12,MATCH(A11,SubktrLaborRates!$A$3:$A$12,0),MATCH($C$2,SubktrLaborRates!$A$2:$E$2,0))
C12=INDEX(SubktrLaborRates!$A$3:$E$12,MATCH(A12,SubktrLaborRates!$A$3:$A$12,0),MATCH($C$2,SubktrLaborRates!$A$2:$E$2,0))

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4


SubktrLaborRates

*ABCDE
1**123
2No.Concatenated NameCompany ACompany BCompnay C
31Enterprise IT Administration Database Administrator Developmental$62.65$73.59$74.94
42Enterprise IT Administration Database Administrator Full Performance$72.92$90.28$88.39
53Enterprise IT Administration Database Administrator Senior$100.81$118.22$105.68
64Enterprise IT Administration Database Administrator Expert$109.46$131.36$124.90
75Enterprise IT Administration Database Administrator Subject Matter Expert$130.78$136.26$151.80
86Enterprise IT Administration Database Administrator Manager$133.25$138.03$151.80
97Enterprise IT Administration Systems Administrator Developmental$67.79$69.55$73.34
108Enterprise IT Administration Systems Administrator Full Performance$74.57$79.76$83.58
119Enterprise IT Administration Systems Administrator Senior$89.40$103.58$97.99
1210Enterprise IT Administration Systems Administrator Expert$108.51$119.58$121.06

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:64px;"><col style="width:481px;"><col style="width:77px;"><col style="width:76px;"><col style="width:76px;"></colgroup><tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
 
Last edited:
Upvote 0
THAT'S IT!! Thank you...

Wasn't difficult to expand this to cover out to Column CY and Row 296 in my actual file.

Thanks again!!
 
Last edited:
Upvote 0
May be my explaination was week

=INDEX(SubktrLaborRates!$A$1:$E$12,MATCH(CompetitiveRange!B3,SubktrLaborRates!$B$1:$B$12,0),MATCH(CompetitiveRange!$C$1,SubktrLaborRates!$A$1:$E$1,0))
 
Upvote 0

Forum statistics

Threads
1,215,097
Messages
6,123,076
Members
449,094
Latest member
mystic19

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