|
#1
|
|||
|
|||
Re: Calculating wins / losses for tax purposes
Bump I really need help
|
#2
|
|||
|
|||
Re: Calculating wins / losses for tax purposes
I use an Excel macro that I stole from MNPoker.
Here are the instructions: Open PT for the dates you want covered. Go to the Session Notes tab. Click the "p" (print) button right above the Session Detail section (second section). Click the Export button Browse to where you want to save the file. Then click "Export". PT will confirm that the file was exported. Now, go open that Excel file. Now, per MNPoker's instructions..."In Column Q (Row2) enter the following Formula (On the sheet PT data is in): =DATE(YEAR(A2),MONTH(A2),DAY(A2))+HOUR(A2)/24+MINUTE(A2)/(24*60) Drag the formula into Column R as well and down the sheet. So in column R row 10 the formula will look like this: =DATE(YEAR(B10),MONTH(B10),DAY(B10))+HOUR(B10)/24+MINUTE(B10)/(24*60)" The data on this page must be sorted from oldest session to newest session. So, click on column A and sort A to Z. Yes, expand the selection when Excel asks. Now create a macro with the code from MNPoker's post. This macro counts all sessions played within two hours of each other as the same. So if you play some poker, quit for an hour, then come back, this counts that as one session. If you want to reduce that amount of time, just change the bold number in the macro code to the desired number (in hrs). Sub Macro1() ' ' Dim SessionStart(10000) Dim SessionEnd(10000) Dim SessionWinLoss(10000) SessionStart(1) = Range("Q2") SessionEnd(1) = Range("R2") SessionWinLoss(1) = Range("H2") Session = 1 X = 2 a = Range("Q1").Offset(X, 0) Do While a <> "" If Range("Q1").Offset(X) <= SessionEnd(Session) + 2 / 24 Then SessionWinLoss(Session) = SessionWinLoss(Session) + Range("H1").Offset(X, 0) SessionEnd(Session) = Application.WorksheetFunction.Max(Range("R1").Offs et(X, 0), SessionEnd(Session)) Else Session = Session + 1 SessionStart(Session) = Range("q1").Offset(X, 0) SessionEnd(Session) = Range("r1").Offset(X, 0) SessionWinLoss(Session) = Range("H1").Offset(X, 0) End If X = X + 1 a = Range("Q1").Offset(X, 0) Loop Sheets.Add.Name = "Output" Worksheets("Output").Select Range("b1") = "Total Sessions Played" Range("b2") = "Win Total" Range("b3") = "Loss Total" Range("b4") = "Net Win / (Loss)" Range("a6") = "Session #" Range("b6") = "Start Time" Range("c6") = "End Time" Range("d6") = "Amount Won" Range("e6") = "Amount Lost" For a = 1 To Session Range("a6").Offset(a) = a Range("b6").Offset(a) = SessionStart(a) Range("b6").Offset(a).NumberFormat = "(ddd) m/d/yy h:mm a/p""m""" Range("c6").Offset(a) = SessionEnd(a) Range("c6").Offset(a).NumberFormat = "(ddd) m/d/yy h:mm a/p""m""" If SessionWinLoss(a) >= 0 Then Wins = Wins + SessionWinLoss(a) Range("d6").Offset(a) = SessionWinLoss(a) Range("d6").Offset(a).NumberFormat = "$#,##0.00" Else Losses = Losses + SessionWinLoss(a) Range("e6").Offset(a) = -SessionWinLoss(a) Range("e6").Offset(a).NumberFormat = "$#,##0.00" End If Next a Range("a1") = Session Range("a2") = Wins Range("a3") = -Losses Range("a4") = Wins + Losses Range("a2").NumberFormat = "$#,##0.00" Range("a3").NumberFormat = "$#,##0.00" Range("a4").NumberFormat = "$#,##0.00" Columns("a:a").ColumnWidth = 15 Columns("b:b").ColumnWidth = 21 Columns("C:C").ColumnWidth = 21 Columns("d:d").ColumnWidth = 15 Columns("e:e").ColumnWidth = 15 ' End Sub Now...run the macro! Let me know if you need anything else explained. |
|
|