Hi All.
I am trying to accomplish the following:
IF checkbox is checked, and the cell in column A on the same row is blank
Then search on another sheet for the next blank row, copy the cell in column A (sheet2) and paste it back into column A (sheet1).
Then from the first sheet copy the row from columns B-J to the second sheet
then repeat for each linked checkbox.
I am running into a Run-Time Error '13' - Type : Mismatch on the following line of code:
Columns("B").Find("", Cells(Rows.Count, "A")).Select.Copy.
Below is my code so far:
Sub MoveData()
Dim R As Integer
R = 3
For R = 3 To 1000 Step 1
If ActiveSheet.Cells(R, "K").Value = "True" And Cells(R, "A") = "" Then
Sheets("QuoteDataSheet").Select
Columns("B").Find("", Cells(Rows.Count, "A")).Select.Copy
Sheets("ITBDataSheet").Select
Cells(R, 1).Select.Paste
Range(Cells(R, "B"), Cells(R, "J")).Select
Selection.Copy
Sheets("QuoteDataSheet").Select
Columns("B").Find("", Cells(Rows.Count, "B")).Select
ActiveSheet.Paste
Sheets("ITBDataSheet").Select
Else
'Do nothing
End If
Next R
End Sub
Let me know if I didnt explain the issue clear enough! I appreciate any help!
I am trying to accomplish the following:
IF checkbox is checked, and the cell in column A on the same row is blank
Then search on another sheet for the next blank row, copy the cell in column A (sheet2) and paste it back into column A (sheet1).
Then from the first sheet copy the row from columns B-J to the second sheet
then repeat for each linked checkbox.
I am running into a Run-Time Error '13' - Type : Mismatch on the following line of code:
Columns("B").Find("", Cells(Rows.Count, "A")).Select.Copy.
Below is my code so far:
Sub MoveData()
Dim R As Integer
R = 3
For R = 3 To 1000 Step 1
If ActiveSheet.Cells(R, "K").Value = "True" And Cells(R, "A") = "" Then
Sheets("QuoteDataSheet").Select
Columns("B").Find("", Cells(Rows.Count, "A")).Select.Copy
Sheets("ITBDataSheet").Select
Cells(R, 1).Select.Paste
Range(Cells(R, "B"), Cells(R, "J")).Select
Selection.Copy
Sheets("QuoteDataSheet").Select
Columns("B").Find("", Cells(Rows.Count, "B")).Select
ActiveSheet.Paste
Sheets("ITBDataSheet").Select
Else
'Do nothing
End If
Next R
End Sub
Let me know if I didnt explain the issue clear enough! I appreciate any help!