I've written this code in an attempt to put a null value in the cell if the formula returns the division by zero error, but I get the 'Overflow' message when I hit the 'If' line. Any ideas why that's happening?
Code:
If IsError(.Cells(SummaryRow2 + t, m) / .Cells(SummaryRow1 + t, m)) Then
.Cells(SummaryRow3 + t, m).Value = Null
Else
.Cells(SummaryRow3 + t, m).Formula = .Cells(SummaryRow2 + t, m) / .Cells(SummaryRow1 + t, m)
End If