Question : Copy and paste data row

Hi Experts,

I would like to request Experts help to write a script which is able to copy the whole row if the Column_C’s  (Reconcile sheet) cell is highlighted. The copied rows need to be paste it at “Result” sheet. Hope Experts can help me to create this feature.


Attachments:
 
 

Answer : Copy and paste data row

Sorry on re-reading I got the sense wrong:

Chris
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
Sub copyRows()
Dim rng As Range
Dim rw As Variant

    For Each rw In Sheets("reconcile").UsedRange.Rows
        If Sheets("reconcile").Range("C" & rw.Row).Interior.Color = 52479 Then
            If rng Is Nothing Then
                Set rng = Sheets("reconcile").Range("C" & rw.Row).EntireRow
            Else
                Set rng = Union(rng, Sheets("reconcile").Range("C" & rw.Row).EntireRow)
            End If
        End If
    Next
    Sheets("result").Rows("2:" & Sheets("result").Rows.Count).Cells.Clear
    If rng Is Nothing Then
        Sheets("result").Visible = False
        MsgBox "No Records Found"
    Else
        rng.Copy Sheets("result").Range("a" & Sheets("result").Rows.Count).End(xlUp).Offset(1, 0)
        Sheets("result").Visible = True
    End If

End Sub
Random Solutions  
 
programming4us programming4us