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

#### shamiq

##### New Member
Hi guys, I have a set of data as shown below which has from and to range and a corresponding value-

 Input Data Range From Range To Value 0.00 46.35 3.8707 46.35 72.17 2.4149 72.17 458.61 2.4149 458.61 486.38 4.2 486.38 631.56 10.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 From Range To Required Answer 0.00 46.35 3.8707 46.35 50.89 2.4149 50.00 50.89 2.4149 50.89 72.17 2.4149 72.17 72.17 2.4149 72.17 458.61 2.4149 458.61 486.38 4.2 486.38 580.00 10.1 580.00 631.56 10.1

### Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use \$ signs: \$V\$2:\$Z\$99 will always point to V2:Z99, even after copying

#### Peter_SSs

##### MrExcel MVP, Moderator
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)

Replies
2
Views
70
Replies
9
Views
295
Replies
0
Views
86
Replies
9
Views
82
Replies
8
Views
207

1,141,412
Messages
5,706,297
Members
421,439
Latest member
JordsdoExcel

### 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.

### Which adblocker are you using?

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

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