# Counting total of consecutive no's for a row.

#### hotrod

##### Board Regular
I've worked out how to do conditional formatting for highlighting consecutive no's in a range, which is =ISNUMBER(MATCH(1,ABS(\$AZ1:\$BE1-AZ1),0)). Now I can't get my head around how to get the total number of consecutive numbers highlighted in a row so that I can copy/paste the formula for the rest of the rows within the range.
Presume formula would be, =COUNTIF?
Thanks

### Excel Facts

Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
You can use this formula

=SUMPRODUCT(--(ISNUMBER(MATCH(AZ1:BE1,AZ1:BE1+1,0))+ISNUMBER(MATCH(AZ1:BE1,AZ1:BE1-1,0))>0))

Note: both this and the conditional formatting formula will regard any blanks in the range as zeroes and therefore 1 or -1 would be highlighted/counted if blanks exist.......

Thanks Barry, all is well.

Replies
11
Views
521
Replies
4
Views
132
Replies
18
Views
467
Replies
2
Views
141
Replies
2
Views
376

1,196,328
Messages
6,014,676
Members
441,835
Latest member
rthomas268

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back