How to get in which range a value lies out of multiple ranges

liamcal23

New Member
Joined
Jul 4, 2019
Messages
2
I have a value e.g 48
There are multiple ranges, and each range will correspond to a specific amount, example below:
11 to 20 --> 15
21 to 30 --> 25
31 to 40 --> 35
41 to 50 --> 45

I want to search for the value 45, so i need to check the multiple ranges to get that specific value on the right-hand side.
So if my value is 48, i want to get 45, likewise if the value is 12 then i want to get back 15.

Is that possible in excel?
Thank you!
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
If you put this in A1:C4

11 20 15
21 30 25
31 40 35
41 50 45

Then either
=LOOKUP(48, A1:A4, C1:C4)
or
=VLOOKUP(48, A1:C4, 3)

will return what you want
 
Upvote 0
If you put this in A1:C4

11 20 15
21 30 25
31 40 35
41 50 45

Then either
=LOOKUP(48, A1:A4, C1:C4)
or
=VLOOKUP(48, A1:C4, 3)

will return what you want

Thank you, how about this:
What if i have the ranges within the same cells as specified?
11 - 20 15
21 - 30 25
31 - 40 35

The range themselves should be in the same cell separated by a dash (-), but the value to retrieve will still be in a cell of its own.
Is that doable?
 
Upvote 0
Its doable with VBA.
If you don't know VBA, the formula approach (with one piece of data per cell) is the only way.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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