I have been working on a simple macro that runs a for loop that takes a cell multiples it by the column and sums it before repeating the again for the next cell in the column. The for loops looks fine but when trying to convert a worksheet cell value to an integer it runs into a type mismatch
Dim ws As Worksheet
Dim wssum As Worksheet
'set worksheets to copy values
Set ws = Sheets("sheet1")
Set wssum = Sheets("sheet2")
Dim i As Integer
Dim j As Integer
Dim bumonth As Currency
Dim busum As Currency
Dim bux As Currency
'sort through months
For i = 0 To 11
'sort through rows the number or rows is hardcoded to the number of apps in sheet
For j = 0 To 43
bumonth = 0
bumonth = CCur(ws.Cells(1, 53 + j).Value * ws.Cells(2 + i, 3 + j).Value)
busum = busum + bumonth
Next j
wssum.Cells(4 + i, 3 + j).Value= busum
Next i
The error is happening at line
bumonth = CInt(ws.Cells(1, 53 + j).Value * ws.Cells(2 + i, 3 + j).Value)
what I was hoping this code would do is grab the values from the form in sheet 1 and export the values onto sheet 2.