Looking for current streak formula

15minoffame

Board Regular
Joined
Nov 26, 2014
Messages
55
Hi again,
I have a spreadsheet that shows a list of stocks. I'm looking for a formula to show the current winning or losing streak. In this case A1 should be 6.

This is an example.

ABCDEFGHIJKL
63.055.241.280.451.142.40-.987.14-2.78-.503.14

<tbody>
</tbody>


Thanks again!
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Remembering that your readers know nothing about your sheet or what you are trying to achieve apart from what you say/show, it would make things easier for them if you gave a fuller explanation.

So guessing then that ..
- column A holds the expected result
- the most recent values are at the left, apart from column A
- a winning/losing streak consists of a series of numbers of the same sign

Try this, copied down

Excel Workbook
ABCDEFGHIJKL
163.055.241.280.451.142.4-0.987.14-2.78-0.53.14
21-652
31166666666666
40
54-2-9-6-7
Streak
 
Upvote 0
Hi Peter,
My apologies. I should've titled my rows Month. I will certainly remember this the next time I need help. I really appreciate your help! Your formula worked wonderfully! How would I change the formula to change A5 to -4 since there are four negative numbers in a row.

Thanks again!
 
Upvote 0
How would I change the formula to change A5 to -4 since there are four negative numbers in a row.
Change my A1 formula to

=IFERROR(MATCH(TRUE,INDEX(SIGN(B1:L1)<>SIGN(B1),0),0)-1,COUNT(B1:L1))*SIGN(B1)
 
Upvote 0

Forum statistics

Threads
1,214,642
Messages
6,120,698
Members
448,979
Latest member
DET4492

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