Looking for current streak formula

15minoffame

New Member
Joined
Nov 26, 2014
Messages
47
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!
 

Some videos you may like

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
47,926
Office Version
  1. 365
Platform
  1. Windows
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
 

15minoffame

New Member
Joined
Nov 26, 2014
Messages
47
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!
 

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
47,926
Office Version
  1. 365
Platform
  1. Windows
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)
 

Watch MrExcel Video

Forum statistics

Threads
1,123,402
Messages
5,601,475
Members
414,452
Latest member
Dannysamworth

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
Top