hi all. i 've got an easy problem....
when i run this macro it display the "Run Time Error 451 - Object not a Collection"
thx max
when i run this macro it display the "Run Time Error 451 - Object not a Collection"
Code:
k = 2
For i = 2 To 556
For j = 2 To 188
If Worksheets(4).Cells(j, 6) = Worksheets(4).Cells(i, 13) Then
If Worksheets(4).Cells(i, 10) = "P" Then
If Worksheets(4).Cells.Value(k, 18) <> 0 Then
Worksheets(4).Cells(k, 19) = Worksheets(4).Cells.Value(k, 18) / Worksheets(4).Cells.Value(j, 3)
End If
Else
If Worksheets(4).Cells(i, 10) = "J" Then
If Worksheets(4).Cells.Value(k, 18) <> 0 Then
Worksheets(4).Cells(k, 19) = Worksheets(4).Cells.Value(k, 18) / Worksheets(4).Cells.Value(j, 4)
End If
Else
If Worksheets(4).Cells(i, 10) = "Y" Then
If Worksheets(4).Cells.Value(k, 18) <> 0 Then
Worksheets(4).Cells(k, 19) = Worksheets(4).Cells.Value(k, 18) / Worksheets(4).Cells.Value(j, 5)
End If
End If
End If
End If
End If
Next j
k = k + 1
Next i
thx max