sharper092
New Member
- Joined
- Jun 11, 2016
- Messages
- 2
name | address | ph | em | top don | bldg fund |
jane | aa | b | c | y | |
john | bb | d | e | y | y |
her | dd | h | i | y | |
jane | aa | b | c | y | |
john | bb | d | e | y | y |
her | dd | h | i | y |
<colgroup><col width="64" style="width:48pt" span="6"> <tbody>
</tbody>
I am trying to use the above table as sheet one, and if there is a y in top don in col E then I want the entire row to go to sheet 2 (topdonor), and whenever I change, add or delete from sheet one, (adding or removing individual) sheet 2 will automatically update without duplicating
Private Sub CommandButton1_Click()
x = 2
Do While Cells(x, 1) <> ""
If Cells(x, 1) = "y" Then
Worksheets("main").Rows(x).Copy
Worksheets("topdonor").Activate
eRow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
ActiveSheet.Paste Destination:=Worksheets("topdonor").Rows(eRow)
End If
Worksheets("main").Activate
x = x + 1
Loop
End Sub
<strike></strike>