Return higher value within range of Cells

ElectroBins

New Member
Joined
May 6, 2016
Messages
6
I have the following table sorted by Column A, X = my input value. I want value Y =corresponding value in B to:
- Return Y value in column B (rounded up to the next row value).
- If value is less than the minimum return the minimum
- If value is more than the max return an error message.

i.e:
X <=20, Y=44
X= 276, Y=24
X=275. Y=6
X>=1000 Y=Error message
The issue comes when X value is outside the table range, I can solve one but not the other and by adding +1 to match function it goes out of range from one end and inside.

Note: I want to avoid using vlookup.

A
B​
20
44
3343
20020
23033
25060
2612
2756
100024
1000502

<tbody>
</tbody>
Just when you think you have many many things sorted it is funny how the simplest can hold you down.
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
vlookup can only go one way in a table. I also have a monster of a file and if I add a column to my table vlookup does not index correctly. I converted all my formulas to Index and match and it is working like a charm.
 
Last edited:
Upvote 0
Vlookup with choose and regular lookup can search leftwards. Both require your large data set to be rearranged, however, which may not be practical.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,752
Messages
6,132,512
Members
449,731
Latest member
dasda34

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