Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35
Default calculating longest winning/losing streak and totals

Awesome, thanks again!

"Lori Miller" wrote:

To shorten formulas, choose Insert Name Define:

T: =$A$2:$A$99
D: =$B$2:$B$99
i: =ROW(T)
W: =FREQUENCY(IF(D0,T),IF(TMIN(T),(D<=0)*T))
L: =FREQUENCY(IF(D<0,T),IF(TMIN(T),(D=0)*T))
DW:=SUMIF(T,"<="&T,D)-SUMIF(T,"<="&LOOKUP(i-W,i,T),D)
DL:=SUMIF(T,"<="&T,D)-SUMIF(T,"<="&LOOKUP(i-L,i,T),D)

W and DW are the streaks of wins and dollar amounts.
You can enter "=W" in C2:C99 with Ctrl+Shift+Enter {CSE}
which should fill the range, and also "=DW" in D2:D99.
__________________
All formulas need entering with {CSE} except E4 and E9:

Longest Streak of Wins (E2): =MAX(W)
Dollar Amount (E3):=MAX(IF(W=E2,DW))
Start Date (E4): =INDEX(T,MATCH(E5,T,0)-E2+1)
End Date (E5): =MIN(IF(W=E2,IF(DW=E3,T)))

Largest 10 Days (E7):
=MAX(IF(i<=MAX(i)-10+1,SUMIF(T,"<"&LOOKUP(i+10,i,T),D)-SUMIF(T,"<"&T,D)))
Start Date (E8):
=MIN(IF(SUMIF(T,"<"&LOOKUP(i+10,i,T),D)-SUMIF(T,"<"&T,D)=E7,T))
End Date (E9):
=INDEX(T,MATCH(E8,T,0)+10-1)
__________________

For losses:
- Copy formulas to column F
- Edit replace "W" with "L"
- Use =MIN(...) instead of =MAX(...) for largest 10 days

Can't afford any more time on this so HTH, Lori


.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting current winning streak Scopar Excel Worksheet Functions 2 March 5th 08 05:50 AM
Find longest consecutive winning streaks trey1982 Excel Worksheet Functions 7 December 10th 07 06:42 PM
Calculating totals Blissfully Ignorant Excel Discussion (Misc queries) 1 December 6th 05 04:03 PM
Help calculating totals Gary Excel Discussion (Misc queries) 1 February 3rd 05 10:33 PM
Winning Streak ParTeeGolfer Excel Worksheet Functions 4 December 31st 04 11:08 PM


All times are GMT +1. The time now is 07:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"