Results 1 to 4 of 4

Thread: Remove duplicate cell value and not the actual cell.

  1. #1
    Seeker joyguru's Avatar
    Join Date
    Jan 2019
    Posts
    9
    Articles
    0
    Excel Version
    2007, 2010

    Remove duplicate cell value and not the actual cell.



    Register for a FREE account, and/
    or Log in to avoid these ads!

    How to keep the first value of duplicate in a column and delete others (without moving blank cell) using vba excel.

    If I have a row like

    Click image for larger version. 

Name:	Untitled.png 
Views:	69 
Size:	1.9 KB 
ID:	9477

    After I run macro I want
    Click image for larger version. 

Name:	Untitled2.png 
Views:	68 
Size:	1.2 KB 
ID:	9478

  2. #2
    Super Moderator p45cal's Avatar
    Join Date
    Dec 2012
    Posts
    1,620
    Articles
    0
    Excel Version
    365
    try:
    Code:
    Sub blah()
    Set Rng = Range("E11:E21") 'this is the range of cells you want to process.
    For Each cll In Rng.Cells
      If Application.CountIf(Range(Rng.Cells(1), cll), cll.Value) > 1 Then cll.ClearContents
    Next cll
    End Sub

  3. #3
    Seeker joyguru's Avatar
    Join Date
    Jan 2019
    Posts
    9
    Articles
    0
    Excel Version
    2007, 2010
    Thanks

  4. #4
    Super Moderator Bob Phillips's Avatar
    Join Date
    Mar 2011
    Posts
    1,682
    Articles
    0
    Excel Version
    O365
    If you just don't want to see the value, you could use conditional formatting over A1:A11 with a formula of =COUNTIF($A$1:$A1,$A2) and set the font colour to white.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •