Trying to copy rows from spreadsheet named "Items", where if Column E = Yes, then those columns will copy over to spreadsheet named "Print or Email This" & paste starting in row 13 column A.
The code below is isn't working for me.
Sub CopyYes()
Dim c As Range
Dim j As Integer
Dim Source As Worksheet
Dim Target As Worksheet
' Change worksheet designations as needed
Set Source = ActiveWorkbook.Worksheets("Items")
Set Target = ActiveWorkbook.Worksheets("Print or Email This")
j = 1 ' Start copying to row 1 in target sheet
For Each c In Source.Range("E1:E1000") ' Do 1000 rows
If c = "yes" Then
Source.Rows(c.Row).Copy Target.Rows(j)
j = 13 + 1
End If
Next c
End Sub
The code below is isn't working for me.
Sub CopyYes()
Dim c As Range
Dim j As Integer
Dim Source As Worksheet
Dim Target As Worksheet
' Change worksheet designations as needed
Set Source = ActiveWorkbook.Worksheets("Items")
Set Target = ActiveWorkbook.Worksheets("Print or Email This")
j = 1 ' Start copying to row 1 in target sheet
For Each c In Source.Range("E1:E1000") ' Do 1000 rows
If c = "yes" Then
Source.Rows(c.Row).Copy Target.Rows(j)
j = 13 + 1
End If
Next c
End Sub