Match and index

Mike2502

Board Regular
Joined
Jan 19, 2020
Messages
143
Office Version
  1. 2010
Hi guys,

I have tried, youtubed etc however still can't manage to figure this out (noob here). When I try index and match it returns as spill/error. I am trying to use B2 and B3 as changeable variables as per below. The length of employment is the column D and as rows will always be either 3,4,5,10 and as shown below it is '5' this should go across the columns F,G,H,I to fetch the data and return value H6 (£12).

I hope this makes sense?

Capture.PNG
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Hi Mike2502,

Does this do what you want?

Mike2502-Q2.xlsx
ABCDEFGHI
1LoE5LoECost34510
2Rows511212121212
3Result1222214161820
437716202428
548818243036
659920281244
7611122324252
8722224364860
9830526405468
10938828446076
111047130486684
121155432527292
1312637345678100
Sheet1
Cell Formulas
RangeFormula
B3B3=INDEX($F$2:$I$13,MATCH($B$1,$D$2:$D$13,0),MATCH($B$2,$F$1:$I$1,0))
 
Upvote 0
Try
Excel Formula:
=INDEX(Table1[[3]:[10]],B1,MATCH(B2,Table1[[#Headers],[3]:[10]],0))
I've assumed Table1 as you didn't tell us the actual name in your post.
 
Upvote 0
Hi Mike2502,

Does this do what you want?

Mike2502-Q2.xlsx
ABCDEFGHI
1LoE5LoECost34510
2Rows511212121212
3Result1222214161820
437716202428
548818243036
659920281244
7611122324252
8722224364860
9830526405468
10938828446076
111047130486684
121155432527292
1312637345678100
Sheet1
Cell Formulas
RangeFormula
B3B3=INDEX($F$2:$I$13,MATCH($B$1,$D$2:$D$13,0),MATCH($B$2,$F$1:$I$1,0))
Hi Toadstoal,

Thanks for your reply! Unfortunately I get an error on excel #N/A. However, it is what I would like, I'm not sure why the error is occurring?
 
Upvote 0
Try
Excel Formula:
=INDEX(Table1[[3]:[10]],B1,MATCH(B2,Table1[[#Headers],[3]:[10]],0))
I've assumed Table1 as you didn't tell us the actual name in your post.
Hi Jason, thanks for the reply.

Cell b1 needs to match data in column D, is this correct? And this also comes up with #N/A error...
 
Upvote 0
Hi Toadstoal,

Thanks for your reply! Unfortunately I get an error on excel #N/A. However, it is what I would like, I'm not sure why the error is occurring?
My fault, I should have noted you're using a Table. To search the Header I'll also need to change the B2 5 to text, hence the &""

Mike2502-Q2.xlsx
ABCDEFGHI
1LoE5LoECost34510
2Rows511212121212
3Result1222214161820
437716202428
548818243036
659920281244
7611122324252
8722224364860
9830526405468
10938828446076
111047130486684
121155432527292
1312637345678100
Sheet1 (2)
Cell Formulas
RangeFormula
B3B3=INDEX(Table1[[3]:[10]],MATCH($B$1,Table1[LoE],0),MATCH($B$2&"",Table1[[#Headers],[3]:[10]],0))
 
Upvote 0
b1 needs to match data in column D
Column D contains a list of consecutive numbers starting at 1 so you don't need to match, you just use the number in B1 to identify the row position.

I forgot that table headers are always text format, so the column match needs a slight edit.
Excel Formula:
=INDEX(Table1[[3]:[10]],B1,MATCH(B2&"",Table1[[#Headers],[3]:[10]],0))
Looking at the image in post 1, although not definite, it appears that everything in the table could be in text format.
 
Upvote 0
Thanks guys, really appreciate your help. This has worked :)


My fault, I should have noted you're using a Table. To search the Header I'll also need to change the B2 5 to text, hence the &""

Mike2502-Q2.xlsx
ABCDEFGHI
1LoE5LoECost34510
2Rows511212121212
3Result1222214161820
437716202428
548818243036
659920281244
7611122324252
8722224364860
9830526405468
10938828446076
111047130486684
121155432527292
1312637345678100
Sheet1 (2)
Cell Formulas
RangeFormula
B3B3=INDEX(Table1[[3]:[10]],MATCH($B$1,Table1[LoE],0),MATCH($B$2&"",Table1[[#Headers],[3]:[10]],0))

Column D contains a list of consecutive numbers starting at 1 so you don't need to match, you just use the number in B1 to identify the row position.

I forgot that table headers are always text format, so the column match needs a slight edit.
Excel Formula:
=INDEX(Table1[[3]:[10]],B1,MATCH(B2&"",Table1[[#Headers],[3]:[10]],0))
Looking at the image in post 1, although not definite, it appears that everything in the table could be in text format.
 
Upvote 0

Forum statistics

Threads
1,214,897
Messages
6,122,148
Members
449,066
Latest member
Andyg666

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