I have a very basic code to copy "non-blank" data from one sheet and paste to another. The code is not complete yet - I am running in debug mode I get the above error. My code is as below.
Sub SampleFind()
Dim StrWord As String
Dim Quantity As String
Dim i As Long
Call nrows
For j = 2 To 2
For i = 2 To nrows1
StrWord = Sheets("Sheet6").Cells(i, 1).Value
Quantity = Sheets("Sheet6").Cells(i, j).Value
If (Quantity = "") Then
Else
Cells(i, 1).Value.Copy Destination:=Sheets("Sheet8").Cells(i, j) - I get the error when debugging at this location
End If
Next i
Next j
End sub
Sub SampleFind()
Dim StrWord As String
Dim Quantity As String
Dim i As Long
Call nrows
For j = 2 To 2
For i = 2 To nrows1
StrWord = Sheets("Sheet6").Cells(i, 1).Value
Quantity = Sheets("Sheet6").Cells(i, j).Value
If (Quantity = "") Then
Else
Cells(i, 1).Value.Copy Destination:=Sheets("Sheet8").Cells(i, j) - I get the error when debugging at this location
End If
Next i
Next j
End sub