Hi,
I am getting Run Time Error 13 Type Mismatch error when running the below code. Can you pls help solving the issue,
This line is highlighted in yellow.
I am getting Run Time Error 13 Type Mismatch error when running the below code. Can you pls help solving the issue,
This line is highlighted in yellow.
Code:
.Cells(i, 13).Value = .Cells(i, 11).Value - .Cells(i, 12).Value
Code:
Sub MathLWBRANDINS()
Dim i As Integer
Dim condition As Range
Application.ScreenUpdating = False
With Sheets("INS")
For i = 71 To 90
.Cells(i, 9).Value = .Cells(i, 7).Value - .Cells(i, 8).Value
If .Cells(i, 8).Value <> 0 Then
.Cells(i, 10).Value = .Cells(i, 7).Value / .Cells(i, 8).Value - 1
End If
If .Range("G71").Value <> 0 Then
.Cells(i, 11).Value = .Cells(i, 7).Value / .Range("G71").Value * 100
End If
If .Range("H71").Value <> 0 Then
.Cells(i, 12).Value = .Cells(i, 8).Value / .Range("H71").Value * 100
End If
.Cells(i, 13).Value = .Cells(i, 11).Value - .Cells(i, 12).Value
Next i
End With
Application.ScreenUpdating = True
End Sub