Formula correct

theta

Well-known Member
Joined
Jun 9, 2009
Messages
960
Hi, this formula works. But i'm sure there is a simpler solution the find the next non blank row! Any non array methods?

Basically I will be creating a lookup, but instead of the user typing the row number, they just use sequential numbers (1 - 100) and excel translate this index to the next blank row

=SMALL(IF(A1:A17<>"",A1:A17*ROW(A1:A17),""),5)

Cells A1 : A17 in this instance would contain

1
1
1
1
""
""
1
1
""
""
1
1
1
1
""
""
1
1
1
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Your example set of data has all 1s in it, making it hard to spot the value you're trying to find. An array formula seems like the correct approach.

Care to explain what you're trying to do without referring to formulas?
 
Upvote 0
Use a sequential index (1,2,3,4,5,6,7,8,9,10) to be translated as the 'k' giving the ROW() of the next non blank cell. I have cut the formula down to this :

{=SMALL(IF(A1:A17<>"",ROW(A1:A17),""),C2)}

C2 - this cell contains values 1 - 10

I have a large data set of data, with a criteria column. So need to find the next row where the criteria is met (i.e. criteria cell = 1)
 
Upvote 0
Hmmm... basically if I had data in A10 : D50...I would like to be able to scroll through 1-10 on an INDEX dropdown, and it will give me the row number of the next row that meets the criteria. I think I am on the wrong approach as this one is not very flexible.

Example.

A10 : A50 <> ""
B10 : B50 = "Hello"
C10 : C50 = "Wednesday"
D10 : D50 > "0"

Would not like to be able to select 1 - 10 on the dropdown (which would be used as the 'k' for a SMALL formula) then the corresponding ROW() would be returned for the next item meeting the criteria?

Any help appreciated
 
Upvote 0
Your array function seems perfect for this, exactly what it was designed for. What's wrong with it?
Excel Workbook
ABCDE
1Catselectcriteriarow
2Dog3dog8
3Bird
4Cat
5Dog
6Bird
7Cat
8Dog
9Bird
10Cat
11Dog
12Bird
13Cat
14Dog
15Bird
16Cat
17Dog
18Bird
19Cat
20Dog
21Bird
Sheet1
 
Upvote 0

Forum statistics

Threads
1,224,606
Messages
6,179,862
Members
452,948
Latest member
UsmanAli786

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