Ok, if you get stuck, just post what you've tried.
How did you add it?
Glad you sorted it & thanks for the feedback.
For i = 6 To 10
With Sheets(CStr(i))
If LCase(.Range("Z1").Value) = "yes" Then
.Range("A70:F130").Copy Sheets("Data").Range("A" & Rows.Count).End(xlUp).Offset(1)
elseif LCase(.Range("Z1").Value) = "no" Then
.Range("A70:F130").Copy Sheets("Nodata").Range("A" & Rows.Count).End(xlUp).Offset(1)
elseif LCase(.Range("Z1").Value) = "mabye" Then
.Range("A70:F130").Copy Sheets("Maybe").Range("A" & Rows.Count).End(xlUp).Offset(1)
End If
End With
Next i
End Sub
If LCase(.Range("Z1").Value) = "yes" Then
.Range("A70:F130").Copy Workbooks("Moved.xlsx").Sheets("Data").Range("A" & Rows.Count).End(xlUp).Offset(1)
Thanks ill give it a goYes, likeThe other workbook will need to be open.VBA Code:If LCase(.Range("Z1").Value) = "yes" Then .Range("A70:F130").Copy Workbooks("Moved.xlsx").Sheets("Data").Range("A" & Rows.Count).End(xlUp).Offset(1)
Nothing copies to other workbook
Sub ste33uka()
Dim i As Long
For i = 1 To 20
With Sheets(CStr(i))
If LCase(.Range("Z1").Value) = "yes" Then
.Range("A70:F130").Copy Workbooks("Moved.xlsx").Sheets("Data").Range("A" & Rows.Count).End(xlUp).Offset(1)
ElseIf LCase(.Range("Z1").Value) = "no" Then
.Range("A70:F130").Copy Workbooks("Moved.xlsx").Sheets("NoData").Range("A" & Rows.Count).End(xlUp).Offset(1)
End If
End With
Next i
End Sub