Need to match a value within a range

holliday50

New Member
Joined
Jul 20, 2006
Messages
16
I have 2 spreadsheets, one with a single 3-digit number, and the other with ranges. I'm trying to return a number from another column when the 3-digit exists within the range. For example....

590

580-600;603-604;609-612;614;616

And 1.90 in another column in the same spreadsheet as the range.

So in this example since 590 exists within the 580-600 range, I want to return 1.90. If this is not possible through an Excel formula, VB will work as an alternative. Thanks.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
The problem is that the ranges are all in one row. A VLOOKUP wouldn't work if your value is 581 within that range.
 
Upvote 0
The problem is that the ranges are all in one row. A VLOOKUP wouldn't work if your value is 581 within that range.

I just saw this...

What do you mean by 'the ranges are all in one row'?
 
Upvote 0
holliday50

Also, what do you want to return if the lookup number is not in any of the ranges? eg 607
 
Upvote 0

Forum statistics

Threads
1,226,217
Messages
6,189,687
Members
453,563
Latest member
Aswathimsanil

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