SKILL DRILL
Sub AllStocksAnalysis()
Worksheets("All Stocks Analysis").Activate
Range("A1").Value = "All Stocks (2018)"
'Create a header row
Cells(3, 1).Value = "Ticker"
Cells(3, 2).Value = "TotalDailyVolume"
Cells(3, 3).Value = "Return"
For i = 1 To 10
For j = 1 To 10
Cells(i, j).Value = 1
Next j
Next i
End Sub
I'm not exactly sure what to write to put the sum of the row number and column number and to fill in any rectangular block of cells.
- Create a nested for loop that puts a 1 into the cells of all columns A through J, and rows 1 through 10 (e.g., cells A1 - A10, B1 - B10, and so forth).
Sub AllStocksAnalysis()
Worksheets("All Stocks Analysis").Activate
Range("A1").Value = "All Stocks (2018)"
'Create a header row
Cells(3, 1).Value = "Ticker"
Cells(3, 2).Value = "TotalDailyVolume"
Cells(3, 3).Value = "Return"
For i = 1 To 10
For j = 1 To 10
Cells(i, j).Value = 1
Next j
Next i
End Sub
- Modify the nested for loop to put the sum of the row number and column number into each cell.
- Modify the nested for loop again to fill in any rectangular block of cells for m columns and n rows.
I'm not exactly sure what to write to put the sum of the row number and column number and to fill in any rectangular block of cells.