Hello,
I am new to VBA and will like to seek help in writing a macro.
I have got a set of data in a workbook with Sheet 1 range A1 to K373 and a range of data in Sheet 2 ranging from A1 to A30. What I will like to do is to have a VBA code to loop through all the cells in Sheet 1 column C and check which are the cells which value matches those in Sheet 2. Those that matches in Sheet 1 will have the entire row deleted. I have come out with the following codes but it does not work and hope to have someone here to guide me through.
![]()
Sub Test() Dim intcounter As Integer Dim y As String intcounter = 1 Set y = Worksheets("Sheet2").Ranges("A1:A30") For intcounter = 2 To 373 If Cells(intcounter, 3).Value = "y" Then Cells(intcounter, 3).EntireRow.Delete x = x + 1 End If Next End Sub
Bookmarks