View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom Peo Sjoblom is offline
external usenet poster
 
Posts: 3,268
Default Formula to return position of the next Non-blank cell in a column

Do you mean that wherever the first occurrence is you want the next
occurrence? If so

=INDEX(A1:A100,MATCH(TRUE,INDEX(A1:A100,MATCH(TRUE ,A1:A100<"",0)+1):INDEX(A1:A100,100)<"",0)+MATCH (TRUE,A1:A100<"",0))


array entered



will give you the contents of the next non blank cell in A1:A100, if you
want the cell address


=CELL("address",INDEX(A1:A100,MATCH(TRUE,INDEX(A1: A100,MATCH(TRUE,A1:A100<"",0)+1):INDEX(A1:A100,10 0)<"",0)+MATCH(TRUE,A1:A100<"",0)))


the position

=MATCH(TRUE,INDEX(A1:A100,MATCH(TRUE,A1:A100<"",0 )+1):INDEX(A1:A100,100)<"",0)+MATCH(TRUE,A1:A100< "",0)


these are all non volatile

Of course you might want to add a test to make sure it doesn't return an
error if there is 1 or less occurrences in the range like

=IF(COUNTA(A1:A100<=1,"",formula



--
Regards,

Peo Sjoblom



"PCLIVE" wrote in message
...
Given the position of a non-blank cell in a column, is there a way to
return the position of the next non-blank cell in the same column?

Example:
The given position of A1 is not blank. There is an unknown number of
consecutive spaces (blank cells) that follow in the same column. Is there
a formula that will tell me the position of the next non-blank cell?

A
1 Test
2
3
4
5
6 UnknownData

The formula should be able to somehow return the row number or position of
the next non-blank cell, in this case would be row 6 or cell A6. Keep in
mind that the next value is unknown. Is this possible?

Thanks,
Paul