Excel formula to find a value for a group and range

haissk

New Member
Joined
Oct 28, 2008
Messages
48
Hello Experts,

Please help me here. I have a table like below
[TABLE="width: 276"]
<colgroup><col width="69" span="4" style="width:51pt"> </colgroup><tbody>[TR]
[TD="width: 69"]Group[/TD]
[TD="width: 69"]Min[/TD]
[TD="width: 69"]Max[/TD]
[TD="width: 69"]Price[/TD]
[/TR]
[TR]
[TD]G1[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]100[/TD]
[/TR]
[TR]
[TD]G1[/TD]
[TD="align: right"]11[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]200[/TD]
[/TR]
[TR]
[TD]G1[/TD]
[TD="align: right"]21[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]300[/TD]
[/TR]
[TR]
[TD]G1[/TD]
[TD="align: right"]31[/TD]
[TD="align: right"]40[/TD]
[TD="align: right"]400[/TD]
[/TR]
[TR]
[TD]G2[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]120[/TD]
[/TR]
[TR]
[TD]G2[/TD]
[TD="align: right"]11[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]130[/TD]
[/TR]
[TR]
[TD]G2[/TD]
[TD="align: right"]21[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]140[/TD]
[/TR]
[TR]
[TD]G2[/TD]
[TD="align: right"]31[/TD]
[TD="align: right"]40[/TD]
[TD="align: right"]150[/TD]
[/TR]
</tbody>[/TABLE]

when if enter Group and Range value it should return the price
Example G1 - 12 should return 200
G2 - 39 should return 150

Can you please help me with excel formula
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
where do you enter the value ie 12 or 39

the following post may help
choice of formulas
 
Upvote 0
incorrect format of jeanie

the description is your G codes
the Product ID would have your costs in

and item in tge table your costs

i will change to your details - if this is what you are after and where you enter the info cells ?

 
Last edited:
Upvote 0
Excel Workbook
ABCDE
1Description:Product 2
2Cost:30
3Item #:100004IFERROR(LOOKUP(1E+307,1/((B1=A11:A16)*(B2>=B11:B16)*(B2
4OR100004LOOKUP(B2,OFFSET(B10:D16,MATCH(B1,A11:A16,0),,COUNTIF(A11:A16,B1)))
5OR100004LOOKUP(2,1/((A11:A16=B1)*(B11:B16
6
7
8
9
10DescriptionMin CostMax CostItem #
11Product 1125100001
12Product 12650100005
13Product 15175100030
14Product 2125100033
15Product 22650100004
16Product 25175100009
Sheet1
 
Upvote 0
Hi,

Let's say E1 contain group G1 and F1 contain 12

G1 =INDEX(D2:D9,MATCH(1,IF(A2:A9=E1,MATCH(C2:C9,F1,1)),0)) Ctrl+Shift+Enter Not just Enter
 
Upvote 0
Try this
Lookup(2,1/((A$2:A$9=E1)*(F1>=B$2:B$9)*(F1<=C$2:C$9)),D$2:D9)
E1 house G1
F1 house 12
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,306
Members
452,633
Latest member
DougMo

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