Copy certain cells/row based on a true value

travler75

New Member
Joined
Jun 20, 2012
Messages
1
Hello everyone,

I have been searching around for the last several hours and haven't specifically been able to find something that would help me.

I have a check box that when checked provides a true false value, so Column A is the Check box, Column B is the True/False value.

I have data in Columns C:L, what I would like to do is copy the row of data if the value is true and have it loop through all true values in Column B, and copy it in another sheet. The kicker is I need the ability to exclude certain columns in the process for example copy the row from c:l but exclude column J for example. There is a header row in row 8. I am not even sure where to get started on this one.

I would run this process from a control button and would over write the data in the new sheet. Any help is appreciated.

This is what I have and failed miserably

Sub SelectRows()

Dim i As Long
i = 9
Do Until (Cells(i, 1)) = ""

If Cells(i, 2).Text = "True" Then
ThisWorkbook.ActiveSheet.Rows(i).Copy Sheets("sheet1").Range("A" & Rows.Count).End(xlUp).Offset(1, 0)
End If
i = i + 1
Loop

End Sub
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Forum statistics

Threads
1,203,119
Messages
6,053,622
Members
444,674
Latest member
Fieldy1999

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