View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips[_3_] Bob Phillips[_3_] is offline
external usenet poster
 
Posts: 2,420
Default how many rows away from a number to a space below

Try this array formula

=IF(B1=1,IF(NOT(MIN(IF(A1:$A$6="",ROW(A1:$A$6)))), "",MIN(IF(A1:$A$6="",ROW(A1:$A$6)))-ROW()-1),"")

--
__________________________________
HTH

Bob

"wolfgangea" wrote in message
...
In column b there are either a 1 in the cell or a blank. In column A
there
is either a number or blank cell. Is there a function that will say when
there is a 1 in cell b and a blank cell below that 1 in column a how many
rows below is the blank cell.
A B
3 1
5 1
2
3

5

in the example above the 1 in column b next to the 5 from column A is 3
rows
away from the first blank cell in column A. I want the function to find
the
first blank cell going down in the row of column A.
Thanks, Eric