or

or

## 如何计算Excel中连续的正数/负数的最大数量？

#### 用数组公式计算连续正数和负数的最大数量

###### 节省50％的时间，每天为您减少数千次鼠标点击！

=MAX(FREQUENCY(IF(A2:A20>0,ROW(A2:A20)),IF(A2:A20<=0,ROW(A2:A20))))，然后按 Ctrl + Shift + Enter 键一起，你将得到正确的结果，你需要，看截图：

=MAX(FREQUENCY(IF(A2:A20<0,ROW(A2:A20)),IF(A2:A20>=0,ROW(A2:A20))))，然后按 Ctrl + Shift + Enter 同时按键，您将根据需要获得结果，请参阅截图：

### Kutools for Excel帮助您提前完成工作，并从人群中脱颖而出

• 超过300强大的高级功能，专为1500工作场景设计，通过70％提高生产力，让您有更多时间照顾家庭和享受生活。
• 不再需要记忆公式和VBA代码，从现在起让你的大脑休息一下。
• 成为3分钟的Excel专家，复杂和重复的操作可以在几秒钟内完成，
• 每天减少成千上万的键盘和鼠标操作，现在告别职业病。
• 110,000高效人才和300 +世界知名公司的选择。
• 60-day full功能免费试用。 60天退款保证。 2多年的免费升级和支持。

### 将选项卡式浏览和编辑带到Microsoft Office，远比浏览器的选项卡强大

• Office选项卡专为Word，Excel，PowerPoint和其他Office应用程序设计：Publisher，Access，Visio和Project。
• 在同一窗口的新选项卡中打开并创建多个文档，而不是在新窗口中。
• 通过50％提高您的工作效率，每天为您减少数百次鼠标点击！
Say something here...
symbols left.
###### or post as a guest, but your post won't be published automatically.
• To post as a guest, your comment is unpublished.
· 5 months ago
How do you do this with multiple rows? say A1:A10 and C1:C10 ???
• To post as a guest, your comment is unpublished.
· 4 months ago
Hello, Ryan,
Sorry for that, this formula is only applied to single column or row.
If you have other good ideals, please comment here.
Thank you!
• To post as a guest, your comment is unpublished.
· 11 months ago
Not working! Gives the max number of positive results not consecutive ones
• To post as a guest, your comment is unpublished.
· 11 months ago
Hi, Ivan,
The above formula only can help you to count the max number of the positive or negative numbers, it can't extract the consecutive cells.
If you have the good ways, please comment here.
Thank you！
• To post as a guest, your comment is unpublished.
· 1 years ago
Excelente! Funcionou perfeitamente. E se quisermos somar os números de cada intervalo, como ficaria?
• To post as a guest, your comment is unpublished.
· 1 years ago
I want the consecutive positive numbers from last cell of one column in which data is entered. I will have many column i.e. A,B,C,D,E,F etc
• To post as a guest, your comment is unpublished.
· 1 years ago
I want the consecutive positive numbers from last of one column. I will have many column i.e. A,B,C,D,E,F etc