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

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
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,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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