+ Reply to Thread
Results 1 to 4 of 4

Deleting duplicated values

  1. #1
    Registered User
    Join Date
    01-04-2006
    Posts
    10

    Deleting duplicated values

    There must be a simple method in VB to delete duplicate values. I tried the advancedfilter, but I couldn't get it working.

    Anyone able to help me out here...

  2. #2
    Bob Phillips
    Guest

    Re: Deleting duplicated values

    In an adjacent column add the formula

    =IF(COUNTIF($A$1:A1,A1)>1,"Dup","")

    then filter by that mew column on Dup and delete all visible rows.

    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "mariomaf" <[email protected]> wrote in
    message news:[email protected]...
    >
    > There must be a simple method in VB to delete duplicate values. I tried
    > the advancedfilter, but I couldn't get it working.
    >
    > Anyone able to help me out here...
    >
    >
    > --
    > mariomaf
    > ------------------------------------------------------------------------
    > mariomaf's Profile:

    http://www.excelforum.com/member.php...o&userid=30098
    > View this thread: http://www.excelforum.com/showthread...hreadid=498266
    >




  3. #3
    Registered User
    Join Date
    01-04-2006
    Posts
    10
    The idea worked and is helpfull indeed. But isn't there an VB solution which is better? Now I have a "Dup" value for each duplicate value and I should delete these values in VB. So I would prefer to combine. So I think I am gonna transform the worksheet code into VB code .

    Once finished I will post it here for others to use.

  4. #4
    Bob Phillips
    Guest

    Re: Deleting duplicated values

    Just go through the steps with the macro recorder on

    - insert column B
    - add the formula
    - add the autofilter
    - filter the data
    - delete the visible rows
    - delete column B

    It will need tweaking, but you have the basic macro then.

    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "mariomaf" <[email protected]> wrote in
    message news:[email protected]...
    >
    > The idea worked and is helpfull indeed. But isn't there an VB solution
    > which is better? Now I have a "Dup" value for each duplicate value and
    > I should delete these values in VB. So I would prefer to combine. So I
    > think I am gonna transform the worksheet code into VB code .
    >
    > Once finished I will post it here for others to use.
    >
    >
    > --
    > mariomaf
    > ------------------------------------------------------------------------
    > mariomaf's Profile:

    http://www.excelforum.com/member.php...o&userid=30098
    > View this thread: http://www.excelforum.com/showthread...hreadid=498266
    >




+ 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