Results 1 to 8 of 8

Union Ranges and remove duplicates

Threaded View

  1. #1
    Registered User
    Join Date
    10-16-2007
    Posts
    16

    Union Ranges and remove duplicates

    Hello everyone. I'm very close on this one, I'm trying to get the final range to have all duplicates removed. For instance one of the rows with 'bob' and the number '4' shouldn't be seen in the final range. I'm including my sheet for ease of understanding. Thanks for any help.

    Private Sub cmdone_Click()
    Dim Rng1, Rng2 As Range
    Dim Final As Range
    Dim MyRange As Range
    Dim MyRange2 As Range
    Set wks3 = Worksheets(3)
    
    Worksheets(1).Activate
    Set Rng1 = Range("Range1")
    Rng1.Select
    Selection.Copy
    Worksheets(3).Activate
    [A1].Select
    Worksheets(3).Paste
    Worksheets(2).Activate
    Set Rng2 = Range("Range2")
    Rng2.Select
    Selection.Copy
    Worksheets(3).Activate
    [A20].Select
    Worksheets(3).Paste
    Range("A1:B65536", Range("A1:B65536").End(xlUp)).Name = "MyRange"
    With wks3.Range("Range3")
        .SpecialCells(xlBlanks).EntireRow.Delete
        .AdvancedFilter Action:=xlFilterCopy, copytorange:=wks3.Range("Range6"), unique:=True
        On Error Resume Next
    End With
    
    End Sub
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1