Find Next whole number in Range

ManUBlueJay

Active Member
Joined
Aug 30, 2012
Messages
302
Office Version
  1. 2016
Platform
  1. Windows
I have a number in A1.
I want that number to be found in range B1:B100
Then I need to find the next whole number after that. The Cells between is my dynamic range.
Example: A1 has 25

B1 to B10:
B1 12c
12d
B3 25
37b
12c
13d
B7 47
42a
51b
B10 12

So I want my Range to be B4:B6
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Is this what you mean?
Book1
AB
12512c
237b12d
312c25
413d37b
512c
613d
747
842a
951b
1012
Sheet1
Cell Formulas
RangeFormula
A2:A4A2=INDEX($B$1:$B$10,MATCH($A$1,$B$1:$B$10,0)+1):INDEX($B$1:$B$10,AGGREGATE(15,6,ROW($B$1:$B$10)/(ROW($B$1:$B$10)>MATCH($A$1,$B$1:$B$10,0))/ISNUMBER($B$1:$B$10),1)-1)
Dynamic array formulas.
 
Upvote 0
Solution
Brilliant, I usually work with offset and was hoping to just be able to offset the result. I am looking for what you did offset by one col.
 
Upvote 0
If I understand correctly then you just need to change the INDEX ranges (both of them) from column B to column C.
Being a volatile function offset is best avoided where possible, what you are doing should be possible with offset but it would be a longer, less efficient formula.
 
Upvote 0
My Lookup criteria remains in B. The cells that I need in my range are in C
 
Upvote 0
Then you do just need to change the index ranges from B to C.
The index range is the result, the remaining ranges in column B are the lookup criteria based on A1.
 
Upvote 0
Thank you. I have now solved it, and have a better understanding of the Index function. Thank you for that
 
Upvote 0

Forum statistics

Threads
1,214,585
Messages
6,120,391
Members
448,957
Latest member
Hat4Life

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