+ Reply to Thread
Results 1 to 4 of 4

How to find duplicates in a column using VBA and without using worksheet functions??

  1. #1
    Registered User
    Join Date
    02-17-2013
    Location
    india
    MS-Off Ver
    Excel 2010
    Posts
    2

    Question How to find duplicates in a column using VBA and without using worksheet functions??

    I was asked to code on VBA to find duplicates in a column and paste them in other column.
    NOTE: 1. If the value has been repeated more than twice, still you should paste the value into the other column only once.
    2. Use of worksheets function is not allowed.

    Please help me on this ..... thanks in advance.....

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: How to find duplicates in a column using VBA and without using worksheet functions??

    Quote Originally Posted by himanshu_s View Post
    2. Use of worksheets function is not allowed.
    Why not? Is this a homework assignment?

    Can you use worksheet functions if they're within a macro?

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: How to find duplicates in a column using VBA and without using worksheet functions??

    Hello himanshu_s,

    Welcome to the Forum!

    If this is a home work assignment then we provide you answers to your questions. However, it is the policy of this forum not to do you work for you.

    You can use two nested For Next loops and Array or you can use a single For Next loop and the Dictionary object.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  4. #4
    Registered User
    Join Date
    02-17-2013
    Location
    india
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: How to find duplicates in a column using VBA and without using worksheet functions??

    hello everyone,

    actually this question was asked to me during an interview, and since then, I have been thinking about it. So, I have put up this question over here just out of curiosity.

+ 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