hi
i have done this statement it copies a range to 3 sheets ,i have put a if then else statement , if yes is on row q3 then only copy rows = to yes
but now the first statement will not work now,could someone give me some guidance please,have read and downloaded lots of samples,just stuck now
cheers colin
Private Sub CommandButton1_Click()
Dim x As Long, NR As Long, CR As Long, SC As Long
Dim c As Range
For Each c In Worksheets("mfr_list").Range("Q3:Q100")
If c.Value = "Yes" Then
NR = 46
CR = 3
SC = 3
For x = 3 To Sheets("MFR_List").UsedRange.Rows.Count
If Application.CountBlank(Range(Cells(x, 1), Cells(x, 6))) = 0 Then
Range(Cells(x, 1), Cells(x, 6)).Copy Sheets("Completed").Cells(CR, "A")
Range(Cells(x, 1), Cells(x, 6)).Copy Sheets("invoice").Cells(NR, "A")
Range(Cells(x, 1), Cells(x, 6)).Copy Sheets("stored contracts").Cells(SC, "A")
Range(Cells(x, 1), Cells(x, 6)).Copy Sheets("Completed").Cells(CR, "A")
NR = NR + 1
CR = CR + 1
SC = SC + 1
Else: MsgBox "no copy"
End If
Next x
End If
Next c
End Sub
Bookmarks