Multiple IF Conditions with Checkboxes and a Loop

KLAALK

New Member
Joined
Sep 4, 2014
Messages
7
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!
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

Forum statistics

Threads
1,224,973
Messages
6,182,093
Members
453,088
Latest member
Chaoxite

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top