+ Reply to Thread
Results 1 to 5 of 5

Formula or VBA code to remove duplicates

  1. #1
    Registered User
    Join Date
    02-26-2014
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    46

    Formula or VBA code to remove duplicates

    Hi guys,

    I have a set of text in rows which includes duplicates like this:

    Column A
    Text 1
    Text2
    Text1
    Text500
    Text500

    I then need to remove the duplicates and put them in column B. I normally use the remove duplicates button in Excel to do this but seeing as I have to do this task every day, I was hoping there would be either a formula or VBA solution which automatically does this? Can someone help me please?

    Thanks

  2. #2
    Forum Contributor
    Join Date
    06-22-2011
    Location
    somerset
    MS-Off Ver
    365
    Posts
    324

    Re: Formula or VBA code to remove duplicates

    just use record macro in the dev tab when you do it and set a shortcut
    Sub Reputation()
    Dim Problem as Variant
    Dim Reputation as Integer
    For Each Problem in Forum.Threads
        If Problem.Title = "*[Solved]*" and Solver.Name = "Leon V (AW)" Then Reputation = Reputation + 1
    Next Problem
    End Sub

  3. #3
    Registered User
    Join Date
    02-26-2014
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Formula or VBA code to remove duplicates

    thanks for the advice. I could do this but I'd still have to run the macro every time. I want it so that as soon as I paste in the data, the data is populated in a different column without duplicates. is this possible?

  4. #4
    Forum Contributor
    Join Date
    06-22-2011
    Location
    somerset
    MS-Off Ver
    365
    Posts
    324

    Re: Formula or VBA code to remove duplicates

    you could attach it to the worksheet_change() event.
    or you could record the paste as part of the macro and set the sortcut as Ctrl+V

  5. #5
    Registered User
    Join Date
    02-26-2014
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Formula or VBA code to remove duplicates

    Thanks Leon, I think this is what I'll have to do.

+ 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] Using a formula to remove duplicates?
    By controlfreak in forum Excel General
    Replies: 5
    Last Post: 09-05-2013, 11:49 AM
  2. [SOLVED] Inventory code to remove duplicates and sum totals
    By Chilisauce in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-19-2012, 11:41 AM
  3. Need VBA code to remove entries if there are duplicates (remove them totally)
    By BrandonFromSingapore in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-13-2012, 12:50 AM
  4. Remove Duplicates Code
    By Winon in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 11-18-2011, 04:36 PM
  5. Replies: 2
    Last Post: 03-20-2011, 11:19 AM

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