Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default how many rows away from a number to a space below

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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default how many rows away from a number to a space below

Does this array-entered** formula do what you want (change the top end of
the range, the A1000, to suit your needs)?

=MIN(IF(INDIRECT("A"&D1&":A1000")="",ROW(INDIRECT( "A"&D1&":A1000")),""))-COUNT(B:B)

**Commit formula using Ctrl+Shift+Enter, not just Enter by itself.

--
Rick (MVP - Excel)


"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


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default how many rows away from a number to a space below

=IF(B1=1,MATCH(TRUE,INDEX(A1:$A$6="",),)-2,"")

Normally ENTER


"wolfgangea" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
why does blank space appear at end of number? Mary Excel Discussion (Misc queries) 2 March 26th 08 12:04 AM
Number of space in a string [email protected] Excel Discussion (Misc queries) 5 November 8th 06 11:15 PM
inserting a space in a number Anthony Excel Worksheet Functions 5 July 18th 06 05:55 PM
BLANK SPACE TO A NUMBER kevin Excel Worksheet Functions 3 December 30th 05 06:10 PM
Autofit rows - white space. bookmike Excel Discussion (Misc queries) 2 July 8th 05 05:51 PM


All times are GMT +1. The time now is 08:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"