Hi

does anyone want to help me with a vba code /function?

i need a formula to restarrt count if condition is meet on a specified column on same row with condition

A5=cond
A8=cond


=countif($B$1:$E1,B1)
when drag down the formula it in
=countif($B$1:$E2,B2)
=countif($B$1:$E3,B3)
=countif($B$1:$E4,B4)

=countif($B$5:$E5,B5) the formula has changed due to the condition in A5
=countif($B$5:$E6,B6)
=countif($B$5:$E7,B7)
=countif($B$8:$E8,B8) the formula has changed due to the condition in A8