I'm very much a beginner to VBA and i'm trying to create a macro that checks that the values in a specific column on Sheet4 matches on Sheet3. If there is a match I'd like it to put "Match" or "No Match" in Sheet2 starting at D4 and also display a count of the errors in each column in D2:AC2. The current code I have written up just continually runs until excel crashes and all the values come up as "No Match" and I'm not sure what i've done wrong.
Sub ProductCheck()
Dim i, r As Integer
Dim LRow, LRow1 As Long
Dim found As Range
'Copies over all the product names currently set up on demo
Worksheets("Product Rec").Range("B4:AC5000").Clear
Sheets("Demo Product Report").Select
Range("A2:B5000").Copy
Sheets("Product Rec").Select
Range("B4").Select
ActiveSheet.Paste
'Checking if both products are in live and demo
LRow = Sheets(4).Range("A" & Rows.Count).End(xlUp).Row
LRow1 = Sheets(2).Range("B" & Rows.Count).End(xlUp).Row
For i = 2 To LRow
For r = 4 To LRow1
If Sheets(4).Range("A" & i).Value = Sheets(3).Range("A" & i).Value Then
Sheets(2).Range("D" & r).Value = "MATCH"
Else
Sheets(2).Range("D" & r).Value = "NO MATCH"
End If
Next r
Next i
For more info the first part just copies the names of all the products set up to the table on sheet2 and all the checks are placed in the corresponding columns for the products. This is the output table