The code below needs to be modified to put the sum of the row number and column number into each cell. I know that the code written for sum is incorrect or maybe I am misunderstanding what it's asking?
Sub AllStocksAnalysis()
Worksheets("All Stocks Analysis").Activate
Worksheets("All Stocks Analysis").Range("BJ1") = "Sum"
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
With Worksheets("All Stocks Analysis").Range("A1:J10")
.Formula = "=Sum(A1:AI2)"
.Value = .Value
End With
Next i
End Sub
Sub AllStocksAnalysis()
Worksheets("All Stocks Analysis").Activate
Worksheets("All Stocks Analysis").Range("BJ1") = "Sum"
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
With Worksheets("All Stocks Analysis").Range("A1:J10")
.Formula = "=Sum(A1:AI2)"
.Value = .Value
End With
Next i
End Sub