I am working n a program where I need to store 4 individual values in one column and take the sum of 12 different columns so that I can have 4 totals over the past 12 months. The problem that I am running into is that I keep getting TYPE MISMATCH erro 13.
Sub MTBMtotals()
Sheets(8).calculate
meantot = 0
ansitot = 0
apitot = 0
othertot = 0
currmonth = Month("7/22/2013")
curryear = Year("7/22/2013")
Column = currmonth + 2
Row = (curryear - 2012) * 16 + 3
For i = 1 To 12
If Row = 2 Then
Column = 14
Row = Row - 16
End If
meantot = meantotal + Sheets(8).Cells(Row, Column)
ansitot = ansitot + Sheets(8).Cells(Row + 1, Column)
apitot = apitot + Sheets(8).Cells(Row + 2, Column)
othertot = othertot + Sheets(8).Cells(Row + 3, Column) **<------- Error:13**
Column = Column - 1
Next
Sheets(8).Cells(3, 18) = meantotal
Sheets(8).Cells(4, 18) = ansitot
Sheets(8).Cells(5, 18) = apitot
Sheets(8).Cells(6, 18) = othertot
End Sub
Thank you, any help is good help.