Lookup across multiple columns

Mister Tom

New Member
Joined
Nov 12, 2019
Messages
7
Hello I'm new to the forum and look forward to your insights

I have the weight band in column D and want to look up the prices in columns E to J how do I return the right price for each row?

See below

[TABLE="width: 500"]
<tbody>[TR]
[TD]Weight (lbs)[/TD]
[TD]Weight Band[/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[/TR]
[TR]
[TD]167[/TD]
[TD]A[/TD]
[TD]156.53[/TD]
[TD]126.79[/TD]
[TD]107.98[/TD]
[TD]90.78[/TD]
[TD]78.94[/TD]
[TD]64.93[/TD]
[/TR]
[TR]
[TD]4993[/TD]
[TD]D[/TD]
[TD]21[/TD]
[TD]18[/TD]
[TD]45[/TD]
[TD]77[/TD]
[TD]39[/TD]
[TD]18[/TD]
[/TR]
[TR]
[TD]560[/TD]
[TD]C[/TD]
[TD]11[/TD]
[TD]28[/TD]
[TD]63[/TD]
[TD]49[/TD]
[TD]33[/TD]
[TD]19[/TD]
[/TR]
[TR]
[TD]9998[/TD]
[TD]E[/TD]
[TD]28[/TD]
[TD]30[/TD]
[TD]45[/TD]
[TD]51[/TD]
[TD]70[/TD]
[TD]55[/TD]
[/TR]
</tbody>[/TABLE]
 
Hi Peter I want to search only a specific row in sheet 2 to return the cost
You haven't said how to choose the specific row so I'll take a guess that it is simply that for the first formula you want to search the first row of the actual data in Sheet2, for the 2nd formula search the 2nd row etc. If that is not it you will have to specify how I am to determine which row to search. Try this, copied down.

BTW, I get different results to you in row 4 as it seems to me that 560 should give a band of B, not C as shown in post 8. Again, you would need to clarify why if it really should be C.

C2: =INDEX(Sheet2!E$3:J$10000,ROWS(C$2:C2),MATCH(B2,Sheet2!E$2:J$2,0))

00 Old HTML Conversions 2020-04-08 1.xlsm
ABC
1Weight (lbs)Weight BandPrice
2167A156.53
34993D77
4560B28
59998E70
Sheet1





No I don't want wight bands greater than 19999 reverting to A
I asked about this because your formula at the bottom of post 8 would return "A" if the weight was > 19999.
If it is possible for your weights to be that big, you will have to decide what results you want for that.
 
Last edited:
Upvote 0

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
You are correct the nth formula should search the nth row of the actual data in Sheet2.
560 should give a band of B, not C
No weight exceeds 19999

I'm missing the proposed solution, it appears as a code Could you please resend
 
Upvote 0
Use an index/match function.

=INDEX(Sheet2!$E$1:$J$6,3,MATCH(B2,Sheet2!$E$2:$J$2,0))

This assumes that in sheet2 the record "0 - 499" is in E1 etc...

This assumes that in sheet1 the weight "167" is in A2 and the weight band "A" is in B2 etc
 
Upvote 0
I'm missing the proposed solution, it appears as a code Could you please resend
That was due to the forum changing platforms over the weekend. The image should get corrected eventually, but here it is in the new format.

Book1
ABC
1Weight (lbs)Weight BandPrice
2167A156.53
34993D77
4560B28
59998E70
Sheet1
Cell Formulas
RangeFormula
C2:C5C2=INDEX(Sheet2!E$3:J$10000,ROWS(C$2:C2),MATCH(B2,Sheet2!E$2:J$2,0))
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,159
Members
453,021
Latest member
Justyna P

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