Creating a lookup based on min/max values

cruyff73

New Member
Joined
Oct 7, 2016
Messages
29
Hi,

Any help on this really appreciated as I'm totally at a loss:

ABCDEFG
31/12/2017
LevelDateValueLevelValue1Value2
135​
23/05/2016​
120​
12​
13​
130​
13​
14​
140​
14​
15​
150​
15​
16​
160​
16​
17​

What I want to do:
C3 is dependent on - level entered in a3 is between x =y, and if b3 is less than f1 enter corresponding value in column F, or if more than f1 enter value from column G from the table e3:g7
So in this example I would want the value returned to be 13 (value is in the 130 range and date is before f1)

Thanks
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Does this work?
Book4
ABCDEFG
1ABCDEFG
231/12/2017
3LevelDateValueLevelValue1Value2
41355/8/2022141201213
511925/8/2020#N/A1301314
612015/5/20141201401415
715015/9/20131501501516
814910/12/20171491601617
91657/7/2013165
10*119 is below the entry range in the chart.
Sheet2
Cell Formulas
RangeFormula
C4:C9C4=IF(B4<=$F$2,A4,LOOKUP(A4,$E$4:$E$8,$G$4:$G$8))
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

How about
Excel Formula:
=INDEX(F3:G7,MATCH(A3,E3:E7,1),IF(B3<F1,1,2))
 
Upvote 0
Does this work?
Book4
ABCDEFG
1ABCDEFG
231/12/2017
3LevelDateValueLevelValue1Value2
41355/8/2022141201213
511925/8/2020#N/A1301314
612015/5/20141201401415
715015/9/20131501501516
814910/12/20171491601617
91657/7/2013165
10*119 is below the entry range in the chart.
Sheet2
Cell Formulas
RangeFormula
C4:C9C4=IF(B4<=$F$2,A4,LOOKUP(A4,$E$4:$E$8,$G$4:$G$8))


I read the question incorreclty, this solution is incorrect.
 
Upvote 0
Does this work?
Book4
ABCDEFG
1ABCDEFG
231/12/2017
3LevelDateValueLevelValue1Value2
41355/8/2022141201213
511925/8/2020#N/A1301314
612015/5/20141201401415
715015/9/20131501501516
814910/12/20171491601617
91657/7/2013165
10*119 is below the entry range in the chart.
Sheet2
Cell Formulas
RangeFormula
C4:C9C4=IF(B4<=$F$2,A4,LOOKUP(A4,$E$4:$E$8,$G$4:$G$8))
Great thanks but how can I add in that if the date is before f1 to return similar value from f4:f8
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

How about
Excel Formula:
=INDEX(F3:G7,MATCH(A3,E3:E7,1),IF(B3<F1,1,2))
Great thanks, works great. Just can't seem to understand INDEX/MATCH. Really appreciate the help thanks
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,213,513
Messages
6,114,072
Members
448,546
Latest member
KH Consulting

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