Count positive “1” value after the max negative instance appears.

motilulla

Well-known Member
Joined
Feb 13, 2008
Messages
2,422
Office Version
  1. 2010
Using Excel 2010
Hello,

I am using following to get results + & - value In the Column “C” using the formula given by Peter under this link……

I would like to count how many times after the each max negative value like, for example after -1,-2-3 and so on positive value “1” has appeared. Here below is the example sheet in which I need a count formula in the column “F”

Note: my request if I could be possible, I can use the given formula in the excel 2000 also.

MrExcel Question.xlsx
ABCDEFG
1
2
3
4Formula Require
5Result- ValuesCount 1 After - Value
6-1-13
71-25
82-31
9-1-41
10-2-51
11-3-61
12-4-71
131-8
142-9
153-10
16-1-11
17-2-12
181-13
19-1-14
20-2-15
21-3-16
22-4-17
23-5
24-6
251
26-1
27-2
281
29-1
30-2
311
322
33-1
34-2
35-3
36-4
37-5
381
39-1
401
41-1
42-2
431
442
45-1
46-2
47-3
481
492
50-1
51-2
521
532
543
55-1
561
57-1
58-2
59-3
60-4
61-5
62-6
63-7
64-8
65-9
66-10
67-11
68-12
69-13
70-14
71-15
721
73-1
74
75
76
Sheet3


Please help

Thank you all.

Regards,
Moti
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
I think your last value (F12) is wrong. It is after -15, not -7. Paste the formula to F6:
Excel Formula:
=COUNTIFS($C$6:$C$73,1,$C$5:$C$72,E6)
There is a more fancy AGGREGATE function but I was not able make this work. Maybe someone will:
Excel Formula:
=AGGREGATE(3,6,ROW($C$6:$C$73)/($C$6:$C$73=1)/((($C$5:$C$72=E6)+($C$6:$C$73<>$C$5:$C$72))>0))
 
Upvote 0
I think your last value (F12) is wrong. It is after -15, not -7. Paste the formula to F6:
Flashbond, sorry yes it is my error it must go after -15,

Excel Formula:
=COUNTIFS($C$6:$C$73,1,$C$5:$C$72,E6)
Your COUNTIFS formula works fine with excel 2010...but I need also formula which can work with excel version 2000 too is it possible?

Thank you so much for your help

Good Luck

Kind Regards,
Moti
 
Upvote 0
This will work for Excel 2000:
Excel Formula:
=SUMPRODUCT(--($C$6:$C$73=1),--($C$5:$C$72=E6))
 
Upvote 0
Solution

Forum statistics

Threads
1,222,752
Messages
6,168,007
Members
452,160
Latest member
Bekerinik

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top