Can someone help me , I am getting error with this 2nd line of code
If Sheets(1).Cells(x, 2).Value = Sheets(2).Name Then
Sheets(1).Cells(x, 4).Value = Application.WorksheetFunction.VLookup(Sheets(1).Cells(x, 4), Sheets(2).Range("E6:F30"), 2, False)
Else
Sheets(1).Cells(x, 4).Value = 0
End If
If Sheets(1).Cells(x, 2).Value = Sheets(2).Name Then
Sheets(1).Cells(x, 4).Value = Application.WorksheetFunction.VLookup(Sheets(1).Cells(x, 4), Sheets(2).Range("E6:F30"), 2, False)
Else
Sheets(1).Cells(x, 4).Value = 0
End If