Hi
I have this code
the code will match column B between two sheets , if the ID is matched in SH sheet and the column F contains numeric values then will should show zero in column F for SH sheet when the ID in column B is the same thing when compare with ws sheet.
the cod is too slow to running !!!
any help ,please?
I have this code
VBA Code:
Sub Macro1()
Dim i, S As Integer
Dim Sht, tblPartsAs worksheet
Set tblParts = ActiveWorkbook.Sheets("ws")
Set Sht = ActiveWorkbook.Sheets("sh")
LR = tblParts.Range("E" & Rows.Count).End(3)
LR1 = Sht.Range("E" & Rows.Count).End(3)
For i = 2 To LR
For S = 2 To LR1
If tblParts.Range("B" & i).Value = Sht.Range("B" & S).Value And Sht.Range("F" & S).Value > 0 Then
Sht.Range("F" & S).Value = 0
End If
Next
Next
End Sub
the cod is too slow to running !!!
any help ,please?