Skip to content

Commit

Permalink
Sub3 analysis progress...
Browse files Browse the repository at this point in the history
  • Loading branch information
jhustles committed Mar 18, 2020
1 parent c77ef50 commit 89d9fde
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion VBA_Script_JG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,23 @@ Sub Analysis_3()
ws.Cells(1, 11).Value = "Percent Change"
ws.Cells(1, 12).Value = "Total Stock Volume"

lastrow = ws.Cells(Rows.Count, 1).End(xlUp).Row
lastrow = ws.Cells(Rows.Count, 1).End(xlUp).Row


'setting up the for loop and conditionals
For Row = 2 To lastrow

If ws.Cells(Row + 1, 1).Value <> ws.Cells(Row, 1).Value Then

'Set the Ticker Name
Ticker = ws.Cells(Row, 1).Value

'Add to totals for: TotalOpenPrice, TotalClosePrice, TotalStkVol

TotalOpenPrice = TotalOpenPrice + ws.Cells(Row, 3).Value
TotalClosePrice = TotalClosePrice + ws.Cells(Row, 6).Value
TotalYearlyChange = (TotalClosePrice - TotalOpenPrice)
TotalStkVol = TotalStkVol + ws.Cells(Row, 7).Value

'Print Ticker Name in the Summary Table
ws.Range("I" & SummaryTableTick2).Value = Ticker

0 comments on commit 89d9fde

Please sign in to comment.