+ 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
    203

    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
    XLS 2016
    Posts
    3,651

    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
    XLS 2016
    Posts
    3,651

    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
    203

    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
    203

    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
    XLS 2016
    Posts
    3,651

    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
    203

    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
    XLS 2016
    Posts
    3,651

    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
    203

    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
    XLS 2016
    Posts
    3,651

    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
    203

    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
    XLS 2016
    Posts
    3,651

    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)

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