If a value is included in a range between 2 cells return value related from another range

nunomd

New Member
Joined
Sep 1, 2011
Messages
16
Hi. I would like to use a excel formula to resolve this problem.
Column C is the anwser I pretend.
In the same cell it will return the name of the correct range.
Ex: Between 200 and 300 there are numbers involved that are included in Range 1 and Range 2 (see second table)

[TABLE="width: 500"]
<tbody>[TR]
[TD="align: center"]Cell[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD]From[/TD]
[TD]To[/TD]
[TD]Result: (How to return this value?)[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD]200[/TD]
[TD]300[/TD]
[TD]Range1, Range2[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD]301[/TD]
[TD]400[/TD]
[TD]N/A[/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD]401[/TD]
[TD]500[/TD]
[TD]N/A[/TD]
[/TR]
</tbody>[/TABLE]

Table to Check Value to Return:
[TABLE="width: 500"]
<tbody>[TR]
[TD="align: center"]Cell[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD]120[/TD]
[TD]280[/TD]
[TD]Range 1[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD]281[/TD]
[TD]300[/TD]
[TD]Range 2[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD]600[/TD]
[TD]650[/TD]
[TD]Range 3[/TD]
[/TR]
</tbody>[/TABLE]

Thank you.
Best regards
 
Hi. I would like to use a excel formula to resolve this problem.
Column C is the anwser I pretend.
In the same cell it will return the name of the correct range.
Ex: Between 200 and 300 there are numbers involved that are included in Range 1 and Range 2 (see second table)

[TABLE="width: 500"]
<tbody>[TR]
[TD="align: center"]Cell[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD]From[/TD]
[TD]To[/TD]
[TD]Result: (How to return this value?)[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD]200[/TD]
[TD]300[/TD]
[TD]Range1, Range2[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD]301[/TD]
[TD]400[/TD]
[TD]N/A[/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD]401[/TD]
[TD]500[/TD]
[TD]N/A[/TD]
[/TR]
</tbody>[/TABLE]

Table to Check Value to Return:
[TABLE="width: 500"]
<tbody>[TR]
[TD="align: center"]Cell[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD]120[/TD]
[TD]280[/TD]
[TD]Range 1[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD]281[/TD]
[TD]300[/TD]
[TD]Range 2[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD]600[/TD]
[TD]650[/TD]
[TD]Range 3[/TD]
[/TR]
</tbody>[/TABLE]

Thank you.
Best regards


Hello, can anybody help me in this question?
Thank you!
 
Upvote 0
A lookup table can help you:

*ABCDE
Range 1
Range 2
Range 3
Range 4
Range 5

<tbody>
[TD="bgcolor: #cacaca, align: center"]1[/TD]
[TD="bgcolor: #ccccff"]Low limit[/TD]
[TD="bgcolor: #ccccff"]Range[/TD]

[TD="bgcolor: #cacaca, align: center"]2[/TD]
[TD="align: center"]0[/TD]

[TD="bgcolor: #ccccff"]My Number[/TD]
[TD="align: right"]300[/TD]

[TD="bgcolor: #cacaca, align: center"]3[/TD]
[TD="align: center"]201[/TD]

[TD="bgcolor: #ccccff"]My Range[/TD]
[TD="bgcolor: #ffffcc"]Range 2[/TD]

[TD="bgcolor: #cacaca, align: center"]4[/TD]
[TD="align: center"]301[/TD]

[TD="bgcolor: #cacaca, align: center"]5[/TD]
[TD="align: center"]401[/TD]

[TD="bgcolor: #cacaca, align: center"]6[/TD]
[TD="align: center"]501[/TD]

</tbody>

In cell E3, any of these formulas will work:

=VLOOKUP(E2, $A$2:$B$6, 2, 1)
=LOOKUP(E2, $A$2:$A$6, $B$2:$B$6)
=INDEX($B$2:$B$6, MATCH(E2, $A$2:$A$6, 1))
 
Last edited:
Upvote 0

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