Next Value

twistinginthewind

Board Regular
Joined
Jun 25, 2003
Messages
119
I have a worksheet with Column A with 5 rows (three are blank) See below.
A
1 Test
2 {blank}
3 {blank}
4 {blank}
5 Test 2

What I would like is a formula I can put in column B that would tell me which row contains the next item in column A. so it would looks omthing like:

A B
1 Test 5
2 {blank}
3 {blank}
4 {blank}
5 Test 2

I want to be able to do this no matter how many blanks there are or how many items.

Any ideas?
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
assuming your table started in row 1 - column headings in row 1, data from row 2:
Book1
ABCD
1DataNext hit
215
3 
4 
527
6 
7311
8 
9 
10 
11412
12512
Sheet1



formula is:

=IF(LEN(A2),MIN(IF(LEN(A3:$A$12)>0,ROW(A3:$A$12))),"")

...which needs to be entered with control + shift + enter, not just enter
 
Upvote 0
Or ... in line with Paddy'e thinking ...
Book1
ABCD
1DataNextHit
215
3
4
527
6
7311
8
9
10
11413
12
135
Sheet3


array formula in cell B2 is ... =MIN(IF(A3:$A$65536="","",ROW(A3:$A$65536)))
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,246
Members
449,075
Latest member
staticfluids

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