+ Reply to Thread
Results 1 to 6 of 6

Removing Duplicates without moving cells up

  1. #1
    Registered User
    Join Date
    04-17-2014
    Location
    Dagenham essex
    MS-Off Ver
    Excel 2007
    Posts
    48

    Removing Duplicates without moving cells up

    Hi guys,

    Need a little help with the code on this one.

    I have a table of data where there a duplicate values appearing that i need to get rid of (for pivot table purposes).

    I tried a remove duplicate code that i found on the internet but that made the cells move up but i need them to stay static.

    Any Ideas? Thanks as always.

    Book1.xlsx

  2. #2
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,522

    Re: Removing Duplicates without moving cells up

    You don't show the code you're using so we'll just assume.
    If you change "Delete" or "Delete Shift:=xlUp" to ClearContents, will that do?

  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Removing Duplicates without moving cells up

    Hi Nickyh1984

    Perhaps like this
    Please Login or Register  to view this content.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  4. #4
    Registered User
    Join Date
    04-17-2014
    Location
    Dagenham essex
    MS-Off Ver
    Excel 2007
    Posts
    48

    Re: Removing Duplicates without moving cells up

    hi jolivanes,

    im using the line

    ActiveSheet.Range("n3:o9999").RemoveDuplicates Columns:=Array(1,2), Header:=xlYes

    but the cells move up after removing the duplicates. is there a way to fix them

  5. #5
    Registered User
    Join Date
    04-17-2014
    Location
    Dagenham essex
    MS-Off Ver
    Excel 2007
    Posts
    48

    Re: Removing Duplicates without moving cells up

    Hi jaslake,

    i think that kinda done it. except i only need to clear the duplicates in cells N3:O9999. how can i tweak your masterpiece to achieve this?

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Removing Duplicates without moving cells up

    Hi Nickyh1984

    You say
    cells N3:O9999
    so I assume Rows 1 and 2 are Header Rows.

    Change the Cell References
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] removing duplicates in cells that don't comply with formula.
    By wyldjokre69 in forum Excel General
    Replies: 7
    Last Post: 09-16-2013, 06:54 AM
  2. [SOLVED] Remove duplicates without removing cells (leave blank)
    By RobertOHare in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-10-2013, 09:57 AM
  3. [SOLVED] Removing duplicates and moving to a new sheet
    By tactical in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-01-2012, 08:45 AM
  4. Replies: 6
    Last Post: 03-29-2012, 12:16 AM
  5. Replies: 1
    Last Post: 07-15-2011, 08:36 AM

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