Forum

Notifications
Clear all

Counting Average Consecutive Positive and Negative Numbers

7 Posts
3 Users
0 Reactions
111 Views
(@soubasa)
Posts: 21
Eminent Member
Topic starter
 

Hello,

I need a formula to calculate my answer including the file

Thank you in advance for your response

 
Posted : 21/07/2021 1:58 am
(@jstewart)
Posts: 216
Estimable Member
 

I used the Sumproduct function to get the answer you are looking for. See the attached file, hope it helps! 🙂

 
Posted : 21/07/2021 10:19 am
(@soubasa)
Posts: 21
Eminent Member
Topic starter
 

Thank you for your time

But it's so difficult once I have thousands variable data

Counting positive and negative numbers simply is just a hint

Your formula does not perform calculations automatically

Regards

 
Posted : 21/07/2021 1:17 pm
(@jstewart)
Posts: 216
Estimable Member
 

I'm confused as to what you are looking for, then? You don't want the average of the positives and the average of the negatives? What are you looking to achieve?

 
Posted : 21/07/2021 2:18 pm
(@soubasa)
Posts: 21
Eminent Member
Topic starter
 

I want average of positive and negative number in column A and also it's need to calculate automatically column B because I have variable data in thousands numbers and column B can be changed everyday and it is impossible to resync manualy column B

first formula be able to count consecutive number in column B and then through that calculate average count

Please delete column B and count it in formula "automatic count column B"

I apologize for the complexity of my question

Thank you in advance

 
Posted : 21/07/2021 3:24 pm
(@soubasa)
Posts: 21
Eminent Member
Topic starter
 

Please look at column B & C in this file 

it can be calculate automated but the result is not true

look at please and I'm sure you get my mean

Thank you very much

 
Posted : 22/07/2021 12:55 am
(@debaser)
Posts: 838
Member Moderator
 

Using helper columns:

In b2: =IF(A2>=0,IF(OR(A3<0,A3=""),COUNTIF(A$2:A2,">=0")-SUM(B$1:B1),""),"")

and copy down.

In C2: =IF(A2<0,IF(OR(A3>=0,A3=""),COUNTIF(A$2:A2,"<0")-SUM(C$1:C1),""),"")

and copy down. Then just use AVERAGE on each of those columns.

 
Posted : 22/07/2021 5:30 am
Share: