+ Reply to Thread
Results 1 to 5 of 5

Macro to delete duplicate cell without sorting

  1. #1
    Registered User
    Join Date
    07-17-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    21

    Macro to delete duplicate cell without sorting

    Looking for a macro to satisfy the below my requirement.

    Example Data:
    ColumnA ColumnB ColumnC
    Jane 500 Female
    Jane 200 Female
    Mike 500 Male
    Mike 200 Male

    Expected Data:
    ColumnA ColumnB ColumnC
    Jane 500 Female
    200
    Mike 500 Male
    200

  2. #2
    Forum Contributor vikas.bhandari's Avatar
    Join Date
    04-07-2006
    Location
    Delhi, India
    MS-Off Ver
    Office 2007 and 2010
    Posts
    303

    Re: Macro to delete duplicate cell without sorting

    Hi there!

    Assuming you are running it on Data sorted by ColumnA, the code would be :

    Please Login or Register  to view this content.
    However, if the data is not sorted, it won't really make much sense to remove duplicates.

    Thanks,
    Vikas B

  3. #3
    Registered User
    Join Date
    07-17-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Macro to delete duplicate cell without sorting

    Thanks Vikas for quick reply, hoever I am getting "Run-time error '1004'". When i debug it is higlighting the below code. I am still new to macro, your help would be appreciated.

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor vikas.bhandari's Avatar
    Join Date
    04-07-2006
    Location
    Delhi, India
    MS-Off Ver
    Office 2007 and 2010
    Posts
    303

    Re: Macro to delete duplicate cell without sorting

    Hi,

    Your workbook may be in compatibility mode which may not have 100000 rows. So use this :

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    07-17-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Macro to delete duplicate cell without sorting

    Thanks, that was easy one . Now I am able to get the result what I wanted in ColumnA but my data range is A:BQ, do I have to modify for each column and run the macro or is there anything which can run at one shot?

    Regards,
    Chito

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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