# Counting Consecutive cells in a row with a value greater than zero - how?

S

#### SeanMc

I have 7 cells in a row (D39:J39). Default value of these cells will be
0.00.
I want a cell to display the count of cells whose value is greater than
zero. How do I do this?
I was looking at DCount - but from the documentation in help that I looked
at, the values tested need to be in a column. - is this correct.

Any example will be appreciated -
Thanks - Sean

K

#### Keith74

Hi Sean

try

=COUNTIF(d39:j39,">0")

hth

Keith

S

#### SeanMc

Keith74 said:
Hi Sean

try

=COUNTIF(d39:j39,">0")

hth

Keith

Great - thank you

G

#### Gord Dibben

Note: this counts all cells in the row that are >0

Does not give a count of Consecutive cells as your subject line asked for.

But "great" sorta says it all.

Gord Dibben MS Excel MVP

S

#### SeanMc

Gord Dibben said:
Note: this counts all cells in the row that are >0

Does not give a count of Consecutive cells as your subject line asked for.

But "great" sorta says it all.

Sorry - Guess my typing fingers were working faster than my brain. COUNTIF
does exactly what I wanted.