Summing Largest Consecutive Dollars and Consecutive Average Question

MXL

Board Regular
Joined
Jun 15, 2010
Messages
67
Hello,

I would like to know how i could sum the most consecutive wins in dollars in column A, and the average consecutive wins in column B.

In the table below, you can see in column A1:A3, three consecutive dollar wins which should total $43. How do i go about calculating the largest sum in dollars of consecutive wins which should be $43 because in column A5:A6, there are two consecutive wins that total only $12.

In column B1:B3, three consecutive wins which total 3 and in column B5:B6, two consecutive wins which total 2, how do i go about calculating the average consecutive wins in column B?

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD="align: center"]$23[/TD]
[TD="align: center"]Win[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: center"]$10[/TD]
[TD="align: center"]Win[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"]$10[/TD]
[TD="align: center"]Win[/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: center"]-$42[/TD]
[TD="align: center"]Loss[/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: center"]$9[/TD]
[TD="align: center"]Win[/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD="align: center"]$3[/TD]
[TD="align: center"]Win[/TD]
[/TR]
[TR]
[TD="align: center"]7[/TD]
[TD="align: center"]-$15[/TD]
[TD="align: center"]Loss[/TD]
[/TR]
</tbody>[/TABLE]

Thank you for taking the time to read this, much appreciated.
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Hello

To do this using formulas you will need a couple of helper columns. Please see the image below.

Please note that array formulas must be entered as shown, but before you press Enter or confirm the formula, you need to press the Ctrl, Alt and Enter keys instead - you will know you have done this correctly when curly brackets {} automatically appear around the formula.

Please note this assumes there is a header row and the data starts in row 2. The formulas in columns C and D must be copied down as far as your data goes.

I trust this helps.

[TABLE="width: 640"]
<tbody>[TR]
[TD]Value[/TD]
[TD]Win/Loss[/TD]
[TD]Consec[/TD]
[TD]Consec Value[/TD]
[TD][/TD]
[TD]Average Consec Wins[/TD]
[TD]Longest Consec Wins[/TD]
[TD]Longest Consec $[/TD]
[TD]Largest Consec $[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]$23.00[/TD]
[TD]Win[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]2.5[/TD]
[TD]4[/TD]
[TD]$42.00[/TD]
[TD]$43.00[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]$10.00[/TD]
[TD]Win[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 2"]=AVERAGE(C:C)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]$10.00[/TD]
[TD]Win[/TD]
[TD]3[/TD]
[TD]$43.00[/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 2"]=MAX(C:C)[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]-$42.00[/TD]
[TD]Loss[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 3"]=INDEX(D:D,MATCH(G2,C:C,0))[/TD]
[/TR]
[TR]
[TD]$9.00[/TD]
[TD]Win[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 2"]=MAX(D:D)[/TD]
[/TR]
[TR]
[TD]$3.00[/TD]
[TD]Win[/TD]
[TD]2[/TD]
[TD]$12.00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]-$15.00[/TD]
[TD]Loss[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]-$10.00[/TD]
[TD]Loss[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]-$5.00[/TD]
[TD]Loss[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]$5.00[/TD]
[TD]Win[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]$10.00[/TD]
[TD]Win[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]$12.00[/TD]
[TD]Win[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]$15.00[/TD]
[TD]Win[/TD]
[TD]4[/TD]
[TD]$42.00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]-$5.00[/TD]
[TD]Loss[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]$12.00[/TD]
[TD]Win[/TD]
[TD]1[/TD]
[TD]$12.00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 4"]Array Formula in C2: (copy down)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD="colspan: 7"]=IF(A2>0,IF(A3>0,"",ROW(A2)-MAX(IF(B$1:B2<>"Win",ROW(B$1:B2)))),"")[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 4"]Array Formula in D2: (copy down)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD="colspan: 7"]=IF(ISNUMBER(C2),SUM(IF(ROW(A$1:A2)>(ROW(A2)-C2),A$1:A2)),"")[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Last edited:
Upvote 0
Just saw a typo - it's not Ctrl+Alt+Enter to confirm the formula, it is actually Ctrl+Shift+Enter. Once you have entered the array formula into C2 but before you press Enter, instead press Ctrl (hold it) then Shift (also hold that) and then press Enter (and release all 3 at the same time). You will know it has worked when curly brackets {} appear around the formula.

Edit: and repeat for the formula in D2.
 
Last edited:
Upvote 0
@ Andrew Fergus

Longest consecutive $ would require MAXIFS or array-processing:

=MAXIFS(D:D,C:C,G2)

{=MAX(IF(C:C=G2,D:D))}

where G2 = Longest Consec Wins.
 
Upvote 0
Hi Aladain
Thanks for that. I hadn't stipulated G2 contained the number of Longest Consecutive Wins. I noticed all 3 methods return the same value. Why do you not recommend the Index/Match approach? (Am I correct in assuming you are not recommending this?)
Andrew
 
Upvote 0
Hi Aladain
Thanks for that. I hadn't stipulated G2 contained the number of Longest Consecutive Wins. I noticed all 3 methods return the same value. Why do you not recommend the Index/Match approach? (Am I correct in assuming you are not recommending this?)
Andrew

[Table="width:, class:grid"][tr][td]Row\Col[/td][td]
A​
[/td][td]
B​
[/td][td]
C​
[/td][td]
D​
[/td][/tr][tr][td]
1​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]
[tr][td]
2​
[/td][td]
$23
[/td][td]
Win
[/td][td][/td][td][/td][/tr]
[tr][td]
3​
[/td][td]
$10
[/td][td]
Win
[/td][td][/td][td][/td][/tr]
[tr][td]
4​
[/td][td]
$10
[/td][td]
Win
[/td][td]
3​
[/td][td]
43​
[/td][/tr]
[tr][td]
5​
[/td][td]
($42)
[/td][td]
Loss
[/td][td][/td][td][/td][/tr]
[tr][td]
6​
[/td][td]
$9
[/td][td]
Win
[/td][td][/td][td][/td][/tr]
[tr][td]
7​
[/td][td]
$3
[/td][td]
Win
[/td][td][/td][td][/td][/tr]
[tr][td]
8​
[/td][td]
$100
[/td][td]
win
[/td][td]
3​
[/td][td]
112​
[/td][/tr]
[tr][td]
9​
[/td][td]
($15)
[/td][td]
Loss
[/td][td][/td][td][/td][/tr]
[tr][td]
10​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]
[/table]


Hi Andrew,

Longest consec $ should be 112 dollars. Index+Match can miss that.

Aladin
 
Upvote 0

Forum statistics

Threads
1,223,710
Messages
6,174,019
Members
452,542
Latest member
Bricklin

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