Skip to content

Commit

Permalink
Finished sub2 VBA scripting analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
jhustles committed Mar 18, 2020
1 parent 72edec7 commit 9037563
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion VBA_Script_JG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,29 @@ Sub Analysis_2()

'Change format for Total Percentage Change to Percent style
ws.Range("K" & SummaryTableTick2).Style = "Percent"
End If
End If

'Print the TotalStkVol to the Summary Table
ws.Range("L" & SummaryTableTick2).Value = TotalStkVol

'add one to the summary table row
SummaryTableTick2 = SummaryTableTick2 + 1

'reset the TotalStkVol back to zero
TotalStkVol = 0

'Else the tickers from one cell below to the cell above are equal, then continue
'to sum up the following:
Else
TotalOpenPrice = TotalOpenPrice + ws.Cells(Row, 3).Value
TotalClosePrice = TotalClosePrice + ws.Cells(Row, 6).Value
TotalStkVol = TotalStkVol + ws.Cells(Row, 7).Value

End If

Next Row

Next ws

End Sub

0 comments on commit 9037563

Please sign in to comment.