How can I find the range in which is cell falls when the ranges are not continuous?

an78633

New Member
Joined
Jun 25, 2019
Messages
1
In Tab 1 i have a list of individual 5-digit codes. Each code is a specific type of hospital procedure. In tab 2 I have a list of hospital procedures names and the ranges of 5-digit codes that fall into that procedure. The ranges are NOT continuous and have gaps in them. For example, one procedure might include all codes between 69600 - 69900 and the next might include all codes 70215 - 71005. I have 184 different procedures, each with its own range of codes. I need to look at the individual codes that I have in tab 1 (over 50,000 of them), determine which range of codes the individual cold falls into, and pull back the corresponding procedure name. However, since the code ranges are not continuous and there are gaps, I'm having trouble figuring out how to pull back the correct name for the individual code. Is there a simple way to do this?
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
In Tab 1 i have a list of individual 5-digit codes. Each code is a specific type of hospital procedure. In tab 2 I have a list of hospital procedures names and the ranges of 5-digit codes that fall into that procedure. The ranges are NOT continuous and have gaps in them. For example, one procedure might include all codes between 69600 - 69900 and the next might include all codes 70215 - 71005. I have 184 different procedures, each with its own range of codes. I need to look at the individual codes that I have in tab 1 (over 50,000 of them), determine which range of codes the individual cold falls into, and pull back the corresponding procedure name. However, since the code ranges are not continuous and there are gaps, I'm having trouble figuring out how to pull back the correct name for the individual code. Is there a simple way to do this?


You could explain with real data what you have on each sheet and the expected result.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,239
Members
452,621
Latest member
Laura_PinksBTHFT

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