Hi I'm getting a Runtime Error 1004 @ the bolded line in the following script and I cannot understand why:
Any help would be greatly appreciated.Code:Public Sub MACRO() Dim x As Integer Dim y As Integer Dim n As Integer Sheets("Cognos").Select For x = 46 To 53 For y = 13 To 639 CellValue = Cells(y, x).Text Cells(y, x).Select If CellValue = "ADD SKU" Then Cells(y, 2).Resize(1, 1).Select n = ActiveCell.Value Sheets("Detail").Select NextRow = Cells(Rows.Count, 1).End(xlUp).Row + 1 Cells(NextRow, 5).Select ActiveCell.Value = n Sheets("Cognos").Select End If Next y Next x End Sub




Reply With Quote