+ Reply to Thread
Results 1 to 3 of 3

Remove duplicate email from multiple column

Hybrid View

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

    Remove duplicate email from multiple column

    Hi

    I am trying to remove duplicate email from 16 column of excel file. I have tried remove duplicate,data validation,highlighted duplicate then filter but nothing work for my problem as I dont have same raw. All column has only email address. How can i do it? VBA? I have tried this VBA code. Seems nothing happen after running.

    Sub RemoveDups()

    Dim ws As Worksheet
    Dim col As Range

    For Each col In Sheet2.Range("A:M").Columns
    Sheet2.Range(col.Address).RemoveDuplicates Columns:=1, Header:=xlNo
    Next col

    End Sub

    Any help would be appreciated

  2. #2
    Registered User
    Join Date
    03-17-2017
    Location
    Hell
    MS-Off Ver
    2010
    Posts
    172

    Re: Remove duplicate email from multiple column

    Select range and remove duplicates.

  3. #3
    Registered User
    Join Date
    03-17-2017
    Location
    Hell
    MS-Off Ver
    2010
    Posts
    172

    Re: Remove duplicate email from multiple column

    Hello again,

    I have this code that will convert the range of cells to one column. Insert the new module and assign it to a shape to launch the macro. It will ask for a range to convert which you select. Then it will ask you for a single cell. Select the first cell in the column you want. It will fill down the range. Then highlight the column and you can select remove duplicates from the ribbon.

    I hope this helps,
    Joe

    Sub ConvertRangeToColumn()
    Dim Range1 As Range, Range2 As Range, Rng As Range
    Dim rowIndex As Integer
    xTitleId = "Convert to Column"
    Set Range1 = Application.Selection
    Set Range1 = Application.InputBox("Source Ranges:", xTitleId, Range1.Address, Type:=8)
    Set Range2 = Application.InputBox("Convert to (single cell):", xTitleId, Type:=8)
    rowIndex = 0
    Application.ScreenUpdating = False
    For Each Rng In Range1.Rows
        Rng.Copy
        Range2.Offset(rowIndex, 0).PasteSpecial Paste:=xlPasteAll, Transpose:=True
        rowIndex = rowIndex + Rng.Columns.Count
    Next
    Application.CutCopyMode = False
    Application.ScreenUpdating = True
    End Sub

+ 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. Macro to remove duplicate data in one column and keep highest value in another column
    By Renejorgensen in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-18-2016, 08:56 AM
  2. Remove duplicate rows and move the column data to a new column
    By cmray58 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-22-2015, 03:46 PM
  3. Remove Duplicate Email from VBA generated email
    By Mitchell28 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-17-2015, 01:16 PM
  4. [SOLVED] Remove duplicate entries from one column and output it into another column using formulas
    By alrikvincent in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 07-12-2014, 08:55 AM
  5. Remove rows with duplicate values in one column based on value of another column
    By jolleyje in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-15-2013, 06:20 AM
  6. [SOLVED] Remove row if duplicate ID# in column
    By Usta in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-10-2012, 03:53 PM
  7. Remove Duplicate Email Addresses
    By wirelessimports in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-11-2008, 05:28 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