Hi,
I need to search through a list of part number matching a value. At the moment the code I have is not really efficient as it goes through the entire list of part numbers using a for loop. This takes a long time.
Is there a equivalent vba code to 'find' option, if so can I have some help with it.
After I find the matching part number in list 2 I need to delete it off or carry out another calculation. (following bit of code below shows a portion I have done to delete the entire line if a matching part number is found.)
SCount = Sheets("Specials").Range("A70000").End(xlUp).Row
For x = SCount To 2 Step -1
key = Sheets("Specials").Cells(x, "A").Value
For i = BCount To 2 Step -1
keyb = Sheets("Latest B").Cells(i, "C").Value
Application.StatusBar = "looking for Specials PN: " & key & " in Latest B PN: " & keyb
If key = keyb Then
Sheets("Latest B").Rows(i).EntireRow.Delete
End If
Next i
Next x
Thank you for all your help in advance.
I need to search through a list of part number matching a value. At the moment the code I have is not really efficient as it goes through the entire list of part numbers using a for loop. This takes a long time.
Is there a equivalent vba code to 'find' option, if so can I have some help with it.
After I find the matching part number in list 2 I need to delete it off or carry out another calculation. (following bit of code below shows a portion I have done to delete the entire line if a matching part number is found.)
SCount = Sheets("Specials").Range("A70000").End(xlUp).Row
For x = SCount To 2 Step -1
key = Sheets("Specials").Cells(x, "A").Value
For i = BCount To 2 Step -1
keyb = Sheets("Latest B").Cells(i, "C").Value
Application.StatusBar = "looking for Specials PN: " & key & " in Latest B PN: " & keyb
If key = keyb Then
Sheets("Latest B").Rows(i).EntireRow.Delete
End If
Next i
Next x
Thank you for all your help in advance.