Lookup & Compare Range of Values

Steve 1962

Active Member
Joined
Jan 3, 2006
Messages
349
Office Version
  1. 365
Platform
  1. Windows

Book1
ABCDEFG
1StartEndLocationLocationStartEnd
21.101.20Point 1 >> Point 2Point 1 >> Point 20.002.30
36.506.80Point 3 >> Point 4Point 2 >> Point 32.306.10
42.352.60Point 2 >> Point 3Point 3 >> Point 46.107.80
59.509.80Point 5 >> Point 6Point 4 >> Point 57.809.20
63.604.60Point 2 >> Point 3Point 5 >> Point 69.2010.10
77.608.30Point 4 >> Point 5Point 6 >> Point 710.1013.20
Sheet1


Hi

Looking to have a formula (in column C) that looks at the range of distances in columns A & B and compares them against the right-hand table (cells E1:G7) to give the output in column C that identifies the correct range label in column E.

Thanks
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Hi,

Try this : Ctrl+Shift+Enter NOT just enter

C2 =IFERROR(INDEX($E$2:$E$7,MATCH(1,IF(B2<$G$2:$G$7,IF(A2>$F$2:$F$7,1)))),"No suitable range")


ABCDEFG
1StartEndLocationLocationStartEnd
21.11.2Point 1 >> Point 2Point 1 >> Point 202.3
36.56.8Point 3 >> Point 4Point 2 >> Point 32.36.1
42.352.6Point 2 >> Point 3Point 3 >> Point 46.17.8
59.59.8Point 5 >> Point 6Point 4 >> Point 57.89.2
63.64.6Point 2 >> Point 3Point 5 >> Point 69.210.1
77.68.3No suitable rangePoint 6 >> Point 710.113.2

<colgroup><col span="3"><col><col><col><col span="2"></colgroup><tbody>
</tbody>
 
Upvote 0
Hey thanks very much.

It ceases to amaze me how many brilliant people are out there and you are one "admiral100". Works fine.

Have a good week.
 
Upvote 0

Forum statistics

Threads
1,214,975
Messages
6,122,538
Members
449,088
Latest member
RandomExceller01

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