+ Reply to Thread
Results 1 to 12 of 12

clear values of duplicates in range instead of remove (hold row position)

  1. #1
    Forum Contributor
    Join Date
    03-28-2017
    Location
    Thailand
    MS-Off Ver
    2013
    Posts
    241

    clear values of duplicates in range instead of remove (hold row position)

    hi,

    I 'm searching and try already 4 hours, can not find it ..
    I have the following :

    Please Login or Register  to view this content.
    he do this perfectly, except he move up the rows and also empty rows ..
    I need to have them stay in place and only clear content of these cells in the range

    perfect would be if .ClearContents Array(5, 6), xlYes should exist but ....

    any easy fast way to solve this.. (checking only on column 6 in Array is also ok, 5 is just a doublecheck)
    Thanks

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: clear values of duplicates in range instead of remove (hold row position)

    Please attach an EXCEL sample to avoid us to prepare it ...!
    - Battle without fear gives no glory - Just try

  3. #3
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: clear values of duplicates in range instead of remove (hold row position)

    See next code
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    03-28-2017
    Location
    Thailand
    MS-Off Ver
    2013
    Posts
    241

    Re: clear values of duplicates in range instead of remove (hold row position)

    Hi PCI,

    Thank you, I test it out and it works fine !!
    only one remark ... he clean array 5, 6 (the duplicate reference)
    but actually should clear the whole row in the array = 1 to 7, or cell 27 to 33

    must the WkC then be WkCAr ?

    really great for helping me out !
    Chris

  5. #5
    Forum Contributor
    Join Date
    03-28-2017
    Location
    Thailand
    MS-Off Ver
    2013
    Posts
    241

    Re: clear values of duplicates in range instead of remove (hold row position)

    no, I see WkC is cell 5 or 6 in the array .. sorry
    should be made a range then to clear around the active cell ?

  6. #6
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: clear values of duplicates in range instead of remove (hold row position)

    Is it what you want ??
    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    03-28-2017
    Location
    Thailand
    MS-Off Ver
    2013
    Posts
    241

    Re: clear values of duplicates in range instead of remove (hold row position)

    hi,

    I did a test,
    but it clear every row in the array ...
    something must be wrong maybe on my side.. I look in to it further .. and let you know
    Thanks

  8. #8
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: clear values of duplicates in range instead of remove (hold row position)

    Houps...!
    See next code
    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    03-28-2017
    Location
    Thailand
    MS-Off Ver
    2013
    Posts
    241

    Re: clear values of duplicates in range instead of remove (hold row position)

    Hi PCI

    yes this one do what I want :-)
    one small issue ... he deleted the row below , but I solved it by changing it to
    Please Login or Register  to view this content.
    Thanks again for your help, If I look your code, I would not been able to fix it ...

    Chris

  10. #10
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: clear values of duplicates in range instead of remove (hold row position)

    Good news
    Enjoy Excel

  11. #11
    Forum Contributor
    Join Date
    03-28-2017
    Location
    Thailand
    MS-Off Ver
    2013
    Posts
    241

    Re: clear values of duplicates in range instead of remove (hold row position)

    Hi PCI,

    just a question, the "WkCAr = Array(5, 6)"
    does it mean he check doubles in column 5, and doubles in column 6
    or doubles where values column 5 and 6 are doubles

    ex.
    1.

    jeff 55
    margret 23
    andrew 42
    jeff 87
    susan 23
    andrew 42

    i want he select andrew 42 not jeff and not 23 ...

    can this ? seems like he do jeff and 23 now ..

    Thanks
    Chris

  12. #12
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: clear values of duplicates in range instead of remove (hold row position)

    Here a remake, but it would simpler if you were to attach a Excel sample, showing how is the data , before and after

    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. Remove duplicates & sum values
    By ScaniaR730 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-22-2016, 01:54 AM
  2. [SOLVED] Linked Table does not hold position on page after update
    By phook01 in forum Word Formatting & General
    Replies: 6
    Last Post: 06-17-2015, 10:18 AM
  3. How to remove duplicates AND values that have duplicates?
    By bachfantasia in forum Excel General
    Replies: 9
    Last Post: 05-13-2014, 07:05 PM
  4. [SOLVED] Clear contents for consecutive duplicates in selected range
    By AM0305 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-30-2013, 09:04 PM
  5. Remove duplicates and clear content
    By cokillerliu in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-24-2013, 12:42 AM
  6. Macro to remove duplicates values and keep unique values bases on multiple criteria
    By Ricker090 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-16-2011, 04:37 PM
  7. Reference Cell Hold position even when copied
    By ssword in forum Excel General
    Replies: 9
    Last Post: 11-01-2010, 12:19 PM

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