# 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

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

#### 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
9
Views
204
Replies
0
Views
60
Replies
3
Views
90
Replies
6
Views
181
Replies
2
Views
145

1,136,258
Messages
5,674,670
Members
419,520
Latest member
Jennifer4Dillon

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