Returning range when a value is entered (greater than/equal to)

David2

New Member
Joined
Jan 13, 2018
Messages
39
I'd like to construct a formula where I would enter a number and the result would return the range in which the number is located. The ranges use greater than/equal conditions.

E0A35Xd

https://imgur.com/E0A35Xd

I thought about constructing a nesting IF condition , where the condition_if_true_ would return the appropriate range and if_not would go to the next IF condition however I'm open to ideas.
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
With "x" number in A1 try this formula in any empty cell:

=LOOKUP(J3,{0;11;51;101;201},{"x≤10";"10<x≤50";"50<x≤100";"100<x≤200";"x>200"})<x≤50";"50<x≤100";"100<x≤200";"x><x≤50";"50<x≤100";"100<x≤200";"x>
or replacing semicolons by commas
=LOOKUP(J3,{0,11,51,101,201},{"x≤10","10<x≤50","50<x≤100","100<x≤200","x>200"})<x≤50","50<x≤100","100<x≤200","x>

PS - Don't know how but code tags were "eating" part of the formulas :confused:
</x≤50","50<x≤100","100<x≤200","x></x≤50";"50<x≤100";"100<x≤200";"x></x≤50";"50<x≤100";"100<x≤200";"x>
 
Last edited:
Upvote 0
New try:

=LOOKUP(J3,{0;11;51;101;201},{"x≤10";"10<x≤50";"50<x≤100";"100<x≤200";"x>200"})

=LOOKUP(J3,{0,11,51,101,201},{"x≤10","10<x≤50","50<x≤100","100<x≤200","x>200"})

The problem persists :eek: :confused:
The second part of the first formula should be ~~~> {"x≤10";"10<x≤50";"50<x≤100";"100<x≤200";"x>200"})
an d for the second ~~~>{"x≤10","10<x≤50","50<x≤100","100<x≤200","x>200"})
</x≤50","50<x≤100","100<x≤200","x></x≤50";"50<x≤100";"100<x≤200";"x>
 
Last edited:
Upvote 0
Your range specification doesn't look consistent on that "imgur" you link the forum to.

Maybe:

=LOOKUP(A1,$H$1:$H$5)&" >= X "&LOOKUP(A1,$H$1:$I$5)
 
Upvote 0
I'd like to construct a formula where I would enter a number and the result would return the range in which the number is located. The ranges use greater than/equal conditions.

https://imgur.com/E0A35Xd

I thought about constructing a nesting IF condition , where the condition_if_true_ would return the appropriate range and if_not would go to the next IF condition however I'm open to ideas.

Hi David2,

If possible, you can try this too in B2:

=LOOKUP(A2,B6:B10,A6:A10)

Or

=LOOKUP(A2,{0;10.01;50;100;200},A6:A10)


ABC
1Enter valueCalculated range
20x<=10
3
4
5Ranges to displayValues
6x<=100
710<x<50< font=""></x<50<>10,01
850<=x<10050
9100<=x<200100
10x>=200200
11
*************************************

<tbody>
</tbody>


Markmzz
 
Last edited:
Upvote 0
Your range specification doesn't look consistent on that "imgur" you link the forum to.

Maybe:

=LOOKUP(A1,$H$1:$H$5)&" >= X "&LOOKUP(A1,$H$1:$I$5)

I see I forgat to inline the table to use...

=LOOKUP(A1,{0;10;50;100;200})&" >= X "&LOOKUP(A1,{0,"< 10";10,"< 50";50,"< 100";100,"< 200";200,"< 9.99E+307"})
 
Upvote 0

Forum statistics

Threads
1,214,935
Messages
6,122,337
Members
449,077
Latest member
Jocksteriom

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