Results 1 to 4 of 4

Removing Duplicates from Macro compiled data

Threaded View

Ebbe Removing Duplicates from... 04-03-2019, 06:01 PM
Winon Re: Removing Duplicates from... 04-03-2019, 07:42 PM
Ebbe Re: Removing Duplicates from... 04-03-2019, 11:08 PM
Winon Re: Removing Duplicates from... 04-03-2019, 11:27 PM
  1. #1
    Registered User
    Join Date
    04-03-2019
    Location
    ATL
    MS-Off Ver
    MS Office 2013
    Posts
    2

    Removing Duplicates from Macro compiled data

    Hello!

    I have put together a code that does copy data from column A on my first sheet to column A on my second sheet. But I'm having trouble writing in a final line of code that will take the copied data and search and remove any duplicates.
    I have tried several codes from various other sources that all seem to return 438 or 1004 errors. Any guidance would be much appreciated.

     
    
    Sub copycolumns()
    Dim lastrow As Long, erow As Long
    
    lastrow = Sheets("CAST INFO LOG").Cells(Rows.Count, 1).End(xlUp).Row
    For i = 5 To lastrow
    Sheets("CAST INFO LOG").Cells(i, 1).Copy
    erow = Sheets("CAST WORK LOG").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
    
    Sheets("CAST INFO LOG").Paste Destination:=Worksheets("CAST WORK LOG").Cells(erow, 1)
    
    Next i
    
    Application.CutCopyMode = False
    Worksheets("CAST WORK LOG").Range("A").RemoveDuplicates Columns:=Array(1), Header:=xlYes
    
    End Sub
    Last edited by Ebbe; 04-03-2019 at 11:09 PM. Reason: Solved.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Pop-up asking which is the basis of removing duplicates and max data of 255
    By iamgelmar in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-27-2018, 03:22 AM
  2. Macro to concatenate if removing duplicates?
    By nzim116 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-26-2014, 09:15 AM
  3. removing duplicates from data
    By schzuki in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-14-2013, 01:34 PM
  4. Removing Duplicates in the Current Macro Output
    By kate.middleton1 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-18-2012, 02:25 PM
  5. Replies: 1
    Last Post: 08-24-2012, 05:17 PM
  6. removing duplicates in list macro needed
    By ad9051 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-20-2011, 01:18 PM
  7. Macro is not removing Duplicates as expected
    By christobalc in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-06-2011, 06:35 AM

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