View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default CountBlank with a reset?

This seems overly complicated to me but it works.

Assume the range of interest is B1:B15.

Enter this formula in C1:

=IF(B1="x","",IF(AND(B1="",B2<""),1,TEXT(0,";;;") ))

Enter this formula in C2 and copy down to C15:

=IF(COUNTIF(B$1:B$15,"x")=0,"",IF(B2="x","",IF(OR( AND(B2="",B3<""),ROW(C2)=MAX(ROWS(B$1:B$15))),COU NTBLANK(B$1:B2)-SUM(C$1:C1),"")))

--
Biff
Microsoft Excel MVP


"mpenkala" wrote in message
...
Hey all,

I currently have a running list in columns B-S. The cells either contain
an
'x' or is blank.

What I've looking for is a formula that will count the blank cells in a
column, but reset once a 'x' is given. then re-start counting the blank
cells once it occurs again.
ex.

ColumnC
x
x



<----- here it would show "4" as its been blank for 4 rows
x <----- count resets due to it not being blank.
x

<----- here it would have reset to "2" as it's currently been blank for 2
rows


Thanks in advance!
Matt