Between Values

stapuff

Well-known Member
Joined
Feb 19, 2004
Messages
1,126
In the example below I have the value of 4.11 (the 2 next to it will be the result of the formula I need help with)

I would like to find the value of 4.11 between Col A & Col B and return Col C.

4.11 2

Col A Col B Col C
4.02 4.08 1
4.09 4.14 2
4.15 4.21 3

Thanks,

Kurt
 

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
Hi stapuff.

This is your basic VLOOKUP application.

Code:
=vlookup(4.11,a1:c3,3,true)

Note that this formula doesn't really take any account of the contents of Col B, it only looks at Col A and Col C.
So, if any of the ranges are non-contiguous (I think that's a word :) ) such as 4.02-4.05 followed by 4.09-4.14, you will need a more complex solution.
 
Upvote 0
By setting the vlookup to "true" doesn't have to be exact.. correct?

OMG - I feel like such a noob!
 
Upvote 0
Yes that's exactly right. FALSE would search for an exact match - in your example this would only work for the values 4.02, 4.09 and 4.15. TRUE searches for the next highest value, if an exact match is not found.
So as long as your ranges cover all possible values, this should work.
 
Upvote 0

Forum statistics

Threads
1,214,424
Messages
6,119,401
Members
448,893
Latest member
AtariBaby

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