+ Reply to Thread
Results 1 to 5 of 5

Separating Unique Values & Duplicate Values

  1. #1
    Registered User
    Join Date
    08-24-2016
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    5

    Separating Unique Values & Duplicate Values

    Hi,

    I have data in Column A & D that has three types of values
    1. Duplicate
    2. Value exists in Column A but not in Column D
    3. Value exists in Column D but not in Column A

    I need a vba code to separate values in these three categories and insert 00000 after #1 and 11111 after #2 as separator. Below is example:

    Column A
    Apple
    Orange
    Orange
    Apple
    Banana
    Grapes

    Column D
    Apple
    Orange
    Orange
    Apple
    Mangoes
    Watermelon
    Seeds

    Result:
    Apple
    Orange
    00000
    Banana
    Grapes
    11111
    Mangoes
    Watermelon
    Seeds

    I would appreciate the help

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Separating Unique Values & Duplicate Values

    Maybe I can’t help you (enough) with your problem, but:

    You get better result on your question if you add a small excel file, without confidential information.

    Please also add the expected results manualy in your file.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Contributor IonutC's Avatar
    Join Date
    01-28-2016
    Location
    Bucharest, Romania
    MS-Off Ver
    Office 2019
    Posts
    486

    Re: Separating Unique Values & Duplicate Values

    Hi Gemini,

    You need to have at least excel 2013. you can follow these steps to have unique values
    Filter for unique values

    Select the range of cells, or make sure the active cell is in a table.

    On the Data tab, in the Sort & Filter group, click Advanced.

    The Sort & Filter group on the Data tab

    In the Advanced Filter dialog box, do one of the following:

    To filter the range of cells or table in place, click Filter the list, in-place.

    To copy the results of the filter to another location, do the following:

    Click Copy to another location.

    In the Copy to box, enter a cell reference.

    Alternatively, click Collapse Dialog Button image to temporarily hide the dialog box, select a cell on the worksheet, and then press Expand Dialog Button image .

    Select the Unique records only check box, and click OK.

    The unique values from the selected range are copied to the new location. The original data is not affected.

    More info you can find here
    https://support.office.com/en-us/art...5-ca507915b704
    Please consider:
    Be polite. Thank those who have helped you.
    Click the star icon in the lower left part of the contributor's post and add Reputation. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .
    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Posting code between tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,835

    Re: Separating Unique Values & Duplicate Values

    One way
    Please Login or Register  to view this content.
    Last edited by jindon; 08-26-2016 at 03:28 PM.

  5. #5
    Registered User
    Join Date
    08-24-2016
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    5

    Re: Separating Unique Values & Duplicate Values

    Sample data is attached.
    Attached Files Attached Files

+ 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. [SOLVED] Putting a zero in column B for duplicate values and 1 for unique values
    By treeantz in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-17-2016, 12:37 AM
  2. [SOLVED] Find count of Unique or Duplicate Values based on Concatenated values in 2 columns
    By bdicarlo1 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-03-2014, 12:42 AM
  3. [SOLVED] How to turn duplicate values into unique values
    By dco223 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-19-2013, 01:21 AM
  4. [SOLVED] How to make duplicate values into unique values
    By dexstar in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-05-2013, 02:25 AM
  5. [SOLVED] Delete duplicate values and mantening unique values
    By ronald coletto in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-22-2013, 02:19 PM
  6. Handling duplicate values into unique and sum their next column values
    By No_feelings in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-26-2012, 05:12 PM
  7. Separating unique values from a list
    By Nickster64 in forum Excel General
    Replies: 2
    Last Post: 05-11-2010, 03:47 PM

Tags for this Thread

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