Hello everyone, I tried to create this code, but it is very slow. Can someone help me to solve this problem. Thank you
VBA Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.ScreenUpdating = False
Dim d As Variant
Dim f As Variant
Dim e As Integer
e = d + f
For d = 4 To 99
For f = 100 To 1000 Step 100
Cells(d, 1).Value = Val(Cells(d, 3).Value - Cells(d, 2).Value + Cells(d - 1, 1).Value)
Cells(d, 12).Value = Val(Cells(d, 11).Value * Cells(d, 10).Value)
Cells(d, 14).Value = Val(Cells(d, 13).Value * Cells(d, 10).Value)
Cells(d, 10).Value = Val(Cells(d, 9).Value * Cells(d, 8).Value)
Cells(d + f - 3, 1).Value = Val(Cells(d + f - 3, 3).Value - Cells(d + f - 3, 2).Value + Cells(d + f - 4, 1).Value)
Cells(d + f - 3, 12).Value = Val(Cells(d + f - 3, 11).Value * Cells(d + f - 3, 10).Value)
Cells(d + f - 3, 14).Value = Val(Cells(d + f - 3, 13).Value * Cells(d + f - 3, 10).Value)
Cells(d + f - 3, 10).Value = Val(Cells(d + f - 3, 9).Value * Cells(d + f - 3, 8).Value)
Next
Next
Application.ScreenUpdating = True
End Sub