View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Herbert Seidenberg
 
Posts: n/a
Default referencing non-blank cells

Assuming the blank cells do not contain zeros,
(but may contain a formula that results in blanks),
and the input column starts at A1 and is named set1 with
Insert Name Define
set1 Refers To: =A1:A100
seq1 Refers To: =ROW(INDEX(A:A,1):INDEX(A:A,ROWS(set1)))
Into B1 enter this array formula with Cntrl+Shift+Enter
=IF(set1 1:1="","",(MATCH(1,--((set1<"")*seq1ROW()),0)-ROW()-1)
*set1 1:1)
and copy down.