Identify range

Noxqss38242

Board Regular
Joined
Sep 15, 2017
Messages
225
Office Version
  1. 2016
Example:

17250
21222
10001
17255

I have a thousand numbers, I have divided into "groups"

I want formula to say:

IF (a2>=17200......and if a2<=17500......THEN return "17200--17500", IF a2>=21200......and if a2<=21400.......THEN return "21200--21400"......ETC.....

I have 16 groups but if needed I think I can cut them down....what is the best way to do this?
 

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.
Hello,

Given that you are working on XL2016, the XLOOKUP is not avaliable, so you should use the INDEX/MATCH combo like this :

Make a table of your groups lower limits in a column, sorted from smaller to larger, write next to it the corresponding desired output.

For example

1720017200--17500
2120021200--...
Then, use MATCH on the searched value, with last parameter = 1, looking on the first column. And Index of the match result, looking on the second column.

Something like :

Excel Formula:
=INDEX(B:B,MATCH(myval,A:A,1))
 
Upvote 0
You can also use VLOOKUP if you enter the lower bounds in your lookup table and have it sorted in increasing order, and set the last argument in the VLOOKUP function (use approximate match) to TRUE.
 
Upvote 0
Solution

Forum statistics

Threads
1,224,014
Messages
6,175,943
Members
452,688
Latest member
Cyb3r_Ang3l

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