Check if value falls within any two values in the same row

iondrt

New Member
Joined
Mar 7, 2017
Messages
3
I'm trying to come up with a formula to check if a value falls within any set of values in a range. This shows what I would like to display but I need a formula for the "Type" column on the right. The trick is I cant just MIN-MAX the 3 rows because I will be adding more rows in the future; so I really need something that can check between table columns (I'm using a table Type B Min and Max).

Type B MinType B Max ValueType
2
15
Type B
131810n/a
262814Type B
16Type B
21n/a
24n/a

<tbody>
</tbody>


Thanks for reading!
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Book1
ABCDE
1Type B MinType B MaxValueType
2275Type B
3131810n/a
4262814Type B
516Type B
621n/a
724n/a
Sheet1
Cell Formulas
RangeFormula
E2=IF($D2<=INDEX($B$2:$B$1000,MATCH($D2,$A$2:$A$1000,1)),"Type B","n/a")


WBD
 
Upvote 0
Below is what I used in my sheet... but first a few clarifiers:
AK19=value
150 Start=Type B Min
150 End=Type B Max


=IF(AK19<=INDEX(Table1[150 Start],MATCH(AK19,Table1[150 End],1)),"Type B","")

The bold/underlined part goes #N/A but every thing else goes fine. Is there something wrong with my formula or should I be looking at my table?
 
Upvote 0
Update:

turns out all I had to do was flip the direction to get it to work

from: =IF($D2<=INDEX($B$2:$B$1000,MATCH($D2,$A$2:$A$1000,1)),"Type B","n/a")

to:
=IF($D2>=INDEX($B$2:$B$1000,MATCH($D2,$A$2:$A$1000,-1)),"Type B","n/a")

thanks for the help!
 
Upvote 0

Forum statistics

Threads
1,215,878
Messages
6,127,506
Members
449,385
Latest member
KMGLarson

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