+ Reply to Thread
Results 1 to 3 of 3

Get unique rows using vba

  1. #1
    Registered User
    Join Date
    06-04-2017
    Location
    India
    MS-Off Ver
    2013
    Posts
    54

    Get unique rows using vba

    I want to copy the unique rows from a range and paste in on the right side of it.
    I want to retain the original input as well and I want unique rows in the right side of it.

    Please check the file with expected output for better understanding.

    Thanks in advance,
    Attached Files Attached Files

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,855

    Re: Get unique rows using vba

    Easiest way is to record following operation.

    Copy range, paste to new location, and perform remove duplicates.

    It will give you something like below.
    Please Login or Register  to view this content.
    Now to clean up. Code should be something like...
    Please Login or Register  to view this content.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  3. #3
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Get unique rows using vba

    AdvancedFilter has both a CopyToOtherLocation and a UniqueOnly options.
    You can either do that from the user interface or use a macro like
    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 01-29-2015, 04:08 PM
  2. Merge Duplicate Rows unique values into single rows for an infinite amount of columns/rows
    By aimeecrystalaid in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-21-2013, 08:43 PM
  3. Replies: 2
    Last Post: 02-06-2013, 04:44 AM
  4. [SOLVED] Applying unique ID's to rows but keep same unique ID number for duplicates
    By sirjames2829 in forum Excel General
    Replies: 2
    Last Post: 12-11-2012, 06:14 PM
  5. Replies: 1
    Last Post: 11-29-2012, 06:24 PM
  6. Replies: 1
    Last Post: 11-19-2012, 04:16 PM
  7. Replies: 2
    Last Post: 05-08-2012, 07:17 PM

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