How To Assign A Value Based On A Number Range In Excel

shamiq

New Member
Joined
Jun 3, 2021
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi guys, I have a set of data as shown below which has from and to range and a corresponding value-

Input Data
Range FromRange ToValue
0.0046.353.8707
46.3572.172.4149
72.17458.612.4149
458.61486.384.2
486.38631.5610.1

I want to compare from and to range from below table and enter the value if the range is in between interval as shown below-

Range FromRange ToRequired Answer
0.0046.353.8707
46.3550.892.4149
50.0050.892.4149
50.8972.172.4149
72.1772.172.4149
72.17458.612.4149
458.61486.384.2
486.38580.0010.1
580.00631.5610.1


Please help me out in finding a solution, I have loads of similar data.
:)
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Welcome to the MrExcel board!

If your Input Data is arranged with the 'From' column in ascending order (as yours is) and there are no overlapping ranges anywhere then try this.

21 06 03.xlsm
ABC
1Input Data
2Range FromRange ToValue
3046.353.8707
446.3572.172.4149
572.17458.612.4149
6458.61486.384.2
7486.38631.5610.1
8
9
10Range FromRange ToValue
11046.353.8707
1246.3550.892.4149
135050.892.4149
1450.8972.172.4149
1572.1772.172.4149
1672.17458.612.4149
17458.61486.384.2
18486.3858010.1
19580631.5610.1
Lookup
Cell Formulas
RangeFormula
C11:C19C11=VLOOKUP(A11,A$3:C$7,3)
 
Upvote 0

Forum statistics

Threads
1,214,919
Messages
6,122,260
Members
449,075
Latest member
staticfluids

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