+ Reply to Thread
Results 1 to 2 of 2

Duplicated rows

  1. #1
    Forum Contributor
    Join Date
    07-28-2005
    Posts
    151

    Duplicated rows

    Sorry about the last post, ignore it.

    My problem is this:

    tariff Product code
    25 0118
    25 0118
    45 0320
    45 0320
    10 0460
    45 0460
    25 0470
    45 0470
    45 0481
    50 0481
    45 0484
    45 0484


    I have the above table, but product codes are duplicated. I want to get rid of the duplicates, even if the tariff is different. Any ideas, there are about 2000 rows .

    Chris

  2. #2
    Forum Contributor
    Join Date
    06-23-2004
    Location
    Houston, TX
    Posts
    571
    Quote Originally Posted by cj21
    Sorry about the last post, ignore it.

    My problem is this:

    tariff Product code
    25 0118
    25 0118
    45 0320
    45 0320
    10 0460
    45 0460
    25 0470
    45 0470
    45 0481
    50 0481
    45 0484
    45 0484


    I have the above table, but product codes are duplicated. I want to get rid of the duplicates, even if the tariff is different. Any ideas, there are about 2000 rows .

    Chris
    Here is how I get rid of my duplicates ... I use formulas to do it because the "Data/Filter/Advanced Filter" procedure does not work for me all the time.

    In C1, enter the formula

    =IF(COUNTIF($B$1:B1,B1)=1,B1,"")

    and copy down until your range requirements are met (C2000). This formula will eliminate all the duplicates but will leave blanks in your Column C.

    In Cell D1, enter the formula

    =IF(ROW()-ROW($D$1:$D$2000)+1>ROWS($C$1:$C$2000)-COUNTBLANK($C$1:$C$2000),"",INDIRECT(ADDRESS(SMALL((IF($C$1:$C$2000<>"",ROW($C$1:$C$2000),ROW()+ROWS($C$1:$C$2000))),ROW()-ROW($D$1:$D$2000)+1),COLUMN($C$1:$C$2000),4)))

    and copy down until D2000. This formula is an array formula so instead of just using the "Enter" key, use the "Ctrl" + "Shift" + "Enter" keys to confirm your formula.

    Your entries in Column D will all be unique and all the blank spaces that were in Column C have been eliminated.

    There may be a more elegant solution out there but meantime, this will work for you.

    Regards.
    BenjieLop
    Houston, TX

+ 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