Lookup & Compare Range of Values

Steve 1962

Active Member
Joined
Jan 3, 2006
Messages
379
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

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
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")


[TABLE="width: 668"]
<colgroup><col span="3"><col><col><col><col span="2"></colgroup><tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Start[/TD]
[TD]End[/TD]
[TD]Location[/TD]
[TD][/TD]
[TD]Location[/TD]
[TD]Start[/TD]
[TD]End[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]1.1[/TD]
[TD]1.2[/TD]
[TD]Point 1 >> Point 2[/TD]
[TD][/TD]
[TD]Point 1 >> Point 2[/TD]
[TD]0[/TD]
[TD]2.3[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]6.5[/TD]
[TD]6.8[/TD]
[TD]Point 3 >> Point 4[/TD]
[TD][/TD]
[TD]Point 2 >> Point 3[/TD]
[TD]2.3[/TD]
[TD]6.1[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]2.35[/TD]
[TD]2.6[/TD]
[TD]Point 2 >> Point 3[/TD]
[TD][/TD]
[TD]Point 3 >> Point 4[/TD]
[TD]6.1[/TD]
[TD]7.8[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]9.5[/TD]
[TD]9.8[/TD]
[TD]Point 5 >> Point 6[/TD]
[TD][/TD]
[TD]Point 4 >> Point 5[/TD]
[TD]7.8[/TD]
[TD]9.2[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]3.6[/TD]
[TD]4.6[/TD]
[TD]Point 2 >> Point 3[/TD]
[TD][/TD]
[TD]Point 5 >> Point 6[/TD]
[TD]9.2[/TD]
[TD]10.1[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]7.6[/TD]
[TD]8.3[/TD]
[TD]No suitable range[/TD]
[TD][/TD]
[TD]Point 6 >> Point 7[/TD]
[TD]10.1[/TD]
[TD]13.2[/TD]
[/TR]
</tbody>[/TABLE]
 
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,223,896
Messages
6,175,263
Members
452,627
Latest member
KitkatToby

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