Looking up a value based on row and column

DavidPonnet

New Member
Joined
Mar 16, 2017
Messages
23
I am currently working on a big project, and need to fill in the pricing schedule.

In table 1, I would like an easy way to fill in the question marks. I have over 150 "cars" to fill in, so I am looking for the best solution to get this automated. I am used to work with Vlookup, but I have over 250 columns in my table 2 and would like to look on name instead of column number

[TABLE="width: 500"]
<tbody>[TR]
[TD]Table 1[/TD]
[TD][/TD]
[TD][/TD]
[TD]Table 2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Car 1[/TD]
[TD]€[/TD]
[TD][/TD]
[TD][/TD]
[TD]Glass[/TD]
[TD]Light[/TD]
[TD]Locks[/TD]
[TD]Wheel[/TD]
[/TR]
[TR]
[TD]Glass[/TD]
[TD]???[/TD]
[TD][/TD]
[TD]Car 1[/TD]
[TD]250
[/TD]
[TD]50[/TD]
[TD]200[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Light[/TD]
[TD]???[/TD]
[TD][/TD]
[TD]Car 2[/TD]
[TD]150[/TD]
[TD]150[/TD]
[TD]200[/TD]
[TD]500[/TD]
[/TR]
[TR]
[TD]Locks[/TD]
[TD]???[/TD]
[TD][/TD]
[TD]Car 3[/TD]
[TD]50[/TD]
[TD][/TD]
[TD]200[/TD]
[TD]500[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Car 2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Glass[/TD]
[TD]???[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Light[/TD]
[TD]???[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Locks[/TD]
[TD]???[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Wheels[/TD]
[TD]???[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Car 3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Glass[/TD]
[TD]???[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Locks[/TD]
[TD]???[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Wheels[/TD]
[TD]???[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Last edited by a moderator:

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Let A:B of Sheet1 house table 1; A:E of Sheet2 table 2.

In B2 of Sheet1 enter and copy down:

=VLOOKUP($A$1,Sheet2!E:F,MATCH($A2,INDEX(Sheet2!A:E,1,0),0),0)
 
Upvote 0
Let A:B of Sheet1 house table 1; A:E of Sheet2 table 2.

In B2 of Sheet1 enter and copy down:

=VLOOKUP($A$1,Sheet2!E:F,MATCH($A2,INDEX(Sheet2!A:E,1,0),0),0)

Thank you for your reply. I a getting an #NA message atm, and not sure how to look for my mistake. (having 2 seperate files instead of tabs makes it even harder)

could you elaborate more on what you have done with the match and index formulas ? (I am quite familiar with Vlookup)

And what are all the 0 and 1 numbers at the end of the line mean ?
 
Upvote 0
It would be easier if the 'headings' (Car 1, Car 2 etc) in the left column of Table 1 were identified as 'headings' in some way.

Never-the-less, for the layout in post no. 1, try this formula copied to the other relevant cells in column B.

Excel Workbook
ABCDEFGH
1Table 1Table 2
2Car 1GlassLightLocksWheels
3Glass250Car 125050200
4Light50Car 2150150200500
5Locks200Car 350200500
6
7Car 2
8Glass150
9Light150
10Locks200
11Wheels500
12
13Car 3
14Glass50
15Locks200
16Wheels500
INDEX
 
Upvote 0
Thank you for your reply. I a getting an #NA message atm, and not sure how to look for my mistake. (having 2 seperate files instead of tabs makes it even harder)

could you elaborate more on what you have done with the match and index formulas ? (I am quite familiar with Vlookup)

And what are all the 0 and 1 numbers at the end of the line mean ?

Test.xlsx

Ive uploaded a testfile on my dropbox (with both in the same tab, but if you could make it work, i think I might get it to work for me :) )

The header row in D:H is 3, not 1. Hence:

=VLOOKUP($A$4,D:H,MATCH($A6,INDEX(D:H,3,0),0),0)
 
Upvote 0
Problem here is i am not getting the value in " Wheel"

[TABLE="width: 1638"]
<colgroup><col><col><col span="2"><col><col><col span="2"></colgroup><tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Table 2[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Table 1[/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[TD]Glass[/TD]
[TD]Light[/TD]
[TD]Locks[/TD]
[TD]Wheel[/TD]
[/TR]
[TR]
[TD]Car 1[/TD]
[TD][/TD]
[TD][/TD]
[TD]Car 1[/TD]
[TD]250[/TD]
[TD]50[/TD]
[TD]200[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[TD]Car 2[/TD]
[TD]150[/TD]
[TD]150[/TD]
[TD]200[/TD]
[TD]500[/TD]
[/TR]
[TR]
[TD]Glass[/TD]
[TD]=VLOOKUP($A$4,D:H,MATCH($A6,INDEX(D:H,3,0),0),0)[/TD]
[TD][/TD]
[TD]Car 3[/TD]
[TD]50[/TD]
[TD] [/TD]
[TD]200[/TD]
[TD]500[/TD]
[/TR]
[TR]
[TD]Light[/TD]
[TD]=VLOOKUP($A$4,D:H,MATCH($A7,INDEX(D:H,3,0),0),0)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Locks[/TD]
[TD]=VLOOKUP($A$4,D:H,MATCH($A8,INDEX(D:H,3,0),0),0)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Car 2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Glass[/TD]
[TD]=VLOOKUP($A$10,D:H,MATCH($A11,INDEX(D:H,3,0),0),0)[/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Light[/TD]
[TD]=VLOOKUP($A$10,D:H,MATCH($A12,INDEX(D:H,3,0),0),0)[/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Locks[/TD]
[TD]=VLOOKUP($A$10,D:H,MATCH($A13,INDEX(D:H,3,0),0),0)[/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Wheels[/TD]
[TD]=VLOOKUP($A$10,D:H,MATCH($A14,INDEX(D:H,3,0),0),0)[/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Car 3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Glass[/TD]
[TD]=VLOOKUP($A$4,D:H,MATCH($A17,INDEX(D:H,3,0),0),0)[/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Locks[/TD]
[TD]=VLOOKUP($A$4,D:H,MATCH($A18,INDEX(D:H,3,0),0),0)[/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Wheels[/TD]
[TD]=VLOOKUP($A$4,D:H,MATCH($A19,INDEX(D:H,3,0),0),0)[/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]

[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

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