## How to count max number of consecutive positive / negative numbers in Excel?

If you have a list of data which mix with positive and negative numbers, and now, you want to count the max number of consecutive positive and negative numbers as following screenshot shown, how could you deal with this task in Excel?

**Count the max number of consecutive positive and negative numbers with array formulas**

#### ** Count the max number of consecutive positive and negative numbers with array formulas**

To get the max number of consecutive positive and negative numbers, please apply the following array formulas:

**Count the max number of consecutive positive numbers:**

Enter this formula into a cell where you want to get the result:

**=MAX(FREQUENCY(IF(A2:A20>0,ROW(A2:A20)),IF(A2:A20<=0,ROW(A2:A20))))**, and then press **Ctrl + Shift + Enter** keys together, and you will get the correct result as you need, see screenshot:

**Count the max number of consecutive negative numbers:**

Enter this formula into a cell where you want to get the result:

**=MAX(FREQUENCY(IF(A2:A20<0,ROW(A2:A20)),IF(A2:A20>=0,ROW(A2:A20))))**, and then press **Ctrl + Shift + Enter** keys simultaneously, and you will get the result as you need, see screenshot:

**Note**: In the above formulas, * A2:A20* is the list of cell range which you want to use.

### Best Office Productivity Tools

**Supercharge Your Spreadsheets： Experience Efficiency Like Never Before with Kutools for Excel**

**Kutools for Excel boasts over 300 features, ensuring that what you need is just a click away...**

Supports Office/Excel 2007-2021 & newer, including 365 | Available in 44 languages | Enjoy a full-featured 30-day free trial.

#### Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!