Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Good day everyone,
With the following code, you compare data between two columns in a different worksheet, and the results are transferred to a third one. Sub test() Dim T(), A As Long Dim Rg As Range, Rg1 As Range With Worksheets("month") Set Rg = .Range("B1:B" & .Range("B65536").End(xlUp).Row) End With With Worksheets("Data received") Set Rg1 = .Range("A1:A" & .Range("A65536").End(xlUp).Row) End With For Each c In Rg If Application.CountIf(Rg1, c) = 0 Then ReDim Preserve T(A) T(A) = c.Value A = A + 1 End If Next Worksheets("Result").Range("A1").Resize(UBound(T) + 1) = _ Application.Transpose(T) End Sub However, I would like to have the entire row to show on the destination sheet rather than the cell value only. Anyone would know where I should modify the code ? Thanks for your time Denys |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
compare two columns in same worksheet for similarities | Excel Worksheet Functions | |||
compare excel worksheet and output difference to new worksheet | Excel Discussion (Misc queries) | |||
Compare 2 worksheets all 6 columns in each worksheet | Excel Worksheet Functions | |||
compare two columns within a worksheet, then highlight duplicates | Excel Worksheet Functions | |||
How do I Compare worksheet columns | Excel Worksheet Functions |