+ Reply to Thread
Results 1 to 3 of 3

count the number of duplicates and print the number of occurences

  1. #1
    Registered User
    Join Date
    08-11-2010
    Location
    Chennai ,India
    MS-Off Ver
    Excel 2003
    Posts
    15

    count the number of duplicates and print the number of occurences

    Hello,
    Please provide me with the macro code for the following problem ,as I am new to excel macro

    i have four columns Batch No,Title,Query,Asset .The batch no,title,Query will remain for a given set of rows.Asset will vary .Sometimes the value of asset might be duplicated. I need to delete the duplicates and put the number of duplicate entries in another column.For unique entries it should be one

    before the macro is executed
    Batch No Title Query Asset No of listings
    1 Apple app apple
    1 Apple app apple
    1 Apple app apple
    1 Apple app apples
    1 Apple app application
    1 Apple app application
    1 Apple app application
    1 Apple app applied
    2 Apple appl apple
    2 Apple appl apple
    2 Apple appl apple
    2 Apple appl application


    after the macro is executed

    Batch No Title Query Asset No of listings
    1 Apple app apple 3
    1 Apple app apples 1
    1 Apple app application 3
    1 Apple app applied 1
    2 Apple appl apple 3
    2 Apple appl application 1

    Any help is very much appreciated

    thanks in advance

    Sen

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: count the number of duplicates and print the number of occurences

    This macro might help.

    Please Login or Register  to view this content.
    Martin

  3. #3
    Registered User
    Join Date
    08-11-2010
    Location
    Chennai ,India
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: count the number of duplicates and print the number of occurences

    Thanks Mrice

    But when i execute the above code , i get the output like this

    BatchNo Title Query Asset No of listings
    1 Apple app apple 1/Apple/app/apple 6

    but it is sufficient i get the number of assets(in this case apple is repeated thrice) alone printed in the No of listings -ie in this case and no need for this 1/Apple/app/apple


    BatchNo Title Query Asset No of listings
    1 Apple app apple 3

    Please tweak the code accordingly and help me

    Thanks in advance

    Sen

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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