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
GroupMinMaxPrice
G1010100
G11120200
G12130300
G13140400
G2010120
G21120130
G22130140
G23140150

<colgroup><col width="69" span="4" style="width:51pt"> </colgroup><tbody>
</tbody>

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

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
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,215,226
Messages
6,123,734
Members
449,116
Latest member
alexlomt

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