Sub mitchellj()
Dim wsCalc As Worksheet: Set wsCalc = Worksheets("Calculator")
Dim wsBet As Worksheet: Set wsBet = Worksheets("Bet Records")
With wsBet
fRow = .Range("A" & Rows.Count).End(xlUp).Offset(1).Row
.Cells(fRow, 1).Value = wsCalc.Range("B1").Value
.Cells(fRow, 2).Value = "Exchange" 'wsCalc.Range("?").Value
.Cells(fRow, 3).Value = wsCalc.Range("B2").Value
.Cells(fRow, 4).Value = wsCalc.Range("D2").Value
.Cells(fRow, 5).Value = wsCalc.Range("B5").Value
.Cells(fRow, 6).Value = wsCalc.Range("B4").Value
.Cells(fRow, 7).Value = wsCalc.Range("B3").Value
.Cells(fRow, 8).Value = wsCalc.Range("B7").Value
.Cells(fRow, 9).Value = wsCalc.Range("D7").Value
.Cells(fRow, 10).Value = wsCalc.Range("B9").Value
.Cells(fRow, 11).Value = wsCalc.Range("B13").Value
.Cells(fRow, 12).Value = wsCalc.Range("B11").Value
.Cells(fRow, 13).Value = "Profit/Loss" 'wsCalc.Range("?").Value
.Cells(fRow, 14).Value = "Return" 'wsCalc.Range("?").Value
End With
With wsCalc
Union(.Range("B1:B11"), .Range("D2"), .Range("D7"), .Range("D9"), .Range("D11"), .Range("F9")).ClearContents
End With
End Sub
calculate rownumber first available empty row
fRow = .Range("A" & Rows.Count).End(xlUp).Offset(1).Row
cells arguments are cells(rownumber,columnnumber)
so if fRow = 10 then cells(fRow,1) means A10, cells(fRow,2) means B10, and so one
Bookmarks