Hello,
I am hoping someone might be able to help me with this issue. I have over 3,000 rows in a worksheet with data in each column from A8 to D3000. In column E, I have inserted a form control check box.
I need a macro that will find which rows are selected by the check box (keep in mind I have hidden rows with check boxes that may or may not be selected), and copy those selected rows to another worksheet named "Products Summary" and paste them in that tab beginning at A8.
Here is a similar code that I am using with a dropdown:
Sub copy()
Sheets("Product Data").Select
Dim tfCol As Range, cell As Object
Set tfCol = Range("E8:E65536")
For Each cell In tfCol
If (cell.EntireRow.Hidden = True) Then
wasHidden = 1
cell.EntireRow.Hidden = False
End If
If IsEmpty(cell) Then
'Move to the next one
End If
If cell.Value = "Yes" Then
cell.EntireRow.Copy
Sheets("Products Summary").Select
ActiveSheet.Range("A65536").End(xlUp).Select
Selection.Offset(1, 0).Select
ActiveSheet.Paste
End If
If (wasHidden = 1) Then
cell.EntireRow.Hidden = True
wasHidden = 0
End If
Next
End Sub
Any help is much appreciated.
Kind regards!
Bookmarks