Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How do I accomplish the following:
1. I would like to add a line of description to the Destination worksheet (such as "Comparison Results") in the Worksheets("Unique"); 2. I would like to color the lines found in Sheet1 before they are copied to Worksheets("Unique"); ----------------------------------------- With Worksheets("Sheet1") Set rng1 = .Range(.Cells(1, 1), .Cells(Rows.Count, 1).End(xlUp)) End With With Worksheets("Sheet2") Set rng2 = .Range(.Cells(1, 1), .Cells(Rows.Count, 1).End(xlUp)) End With For Each cell In rng1 res = Application.Match(cell, rng2, 0) If Not IsError(res) Then Set rng3 = rng2(res) Set rng4 = Worksheets("Match").Cells(Rows.Count, 1).End(xlUp)(2) cell.EntireRow.Copy Destination:=rng4 Else Set rng4 = Worksheets("Unique").Cells(Rows.Count, 1).End(xlUp)(2) cell.EntireRow.Copy Destination:=rng4 End If Next ------------------------------------- Many thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do i insert blank rows between data that is thousands of rows | Excel Discussion (Misc queries) | |||
Insert rows: Formats & formulas extended to additonal rows | Excel Worksheet Functions | |||
How do I sort my data by color? (color applied to rows) | Excel Worksheet Functions | |||
How do i insert of spacer rows between rows in large spreadsheets | Excel Discussion (Misc queries) | |||
Copy Rows and insert these rows before a page break | Excel Programming |