title: VBA Macro Excel for grouping, finding and deleting duplicates
body: <p>I have no idea how to do this so I'm asking it here.<br>
  So this is the CSV I have in excel:</p>
  
  <p><a href="https://i.stack.imgur.com/8prsr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8prsr.png" alt="enter image description here"></a></p>
  
  <p>As you can see, we have dusplicates in the CSV in both price and special price.<br>
  Prices are bound to size. You can see that the size are the "same" yet they have spaces in them. <br></p>
  
  <p><strong>What do I need?</strong><br></p>
  
  <p>The VBA needs to group every sku, example:</p>
  
  <p><a href="https://i.stack.imgur.com/C3K8A.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/C3K8A.png" alt="enter image description here"></a></p>
  
  <p>After this, it needs to find duplicate prices and select those rows and delete the duplicates and NOT the default one, example:</p>
  
  <p><a href="https://i.stack.imgur.com/UozP9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UozP9.png" alt="enter image description here"></a></p>
  
  <p>Next SKU group:</p>
  
  <p><a href="https://i.stack.imgur.com/5dP5K.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5dP5K.png" alt="enter image description here"></a>
  <br>
  Atleast, I think this is the procedure of doing this, if there's an other way, I'd like to hear it.</p>
  
  <p><br>
  For me, I have no idea how I should do this. Maybe an Excel function?<br>
  Is this even possible?<br></p>
  
  <p><strong>UPDATE 1</strong><br></p>
  
  <p>So I've tried R3uK's solution and Marco Getrost's solution, R3uK's did best for me.</p>
  
  <p>I've changed his VBA to the liking of my big CSV.<br>
  Here it is:</p>
  
  <pre><code>Sub test_Sj03rs()
  With ActiveSheet
      'In column D
      With .Range("Y:Y")
          'Change all double spaces to single ones (being extra careful)
          .Replace What:="  ", _
                  Replacement:=" ", _
                  LookAt:=xlPart, _
                  SearchOrder:=xlByRows, _
                  MatchCase:=False, _
                  SearchFormat:=False, _
                  ReplaceFormat:=False
          'Change all slashes+spaces to single slash
          .Replace What:="/ ", _
                  Replacement:="/", _
                  LookAt:=xlPart, _
                  SearchOrder:=xlByRows, _
                  MatchCase:=False, _
                  SearchFormat:=False, _
                  ReplaceFormat:=False
          'Change all spaces+slashes to single slash
          .Replace What:=" /", _
                  Replacement:="/", _
                  LookAt:=xlPart, _
                  SearchOrder:=xlByRows, _
                  MatchCase:=False, _
                  SearchFormat:=False, _
                  ReplaceFormat:=False
      End With
      With .Range("A:AA")
          'To get rid of formulas if there is
          .Value = .Value
          'Remove duplicates considering all columns
          .RemoveDuplicates _
              Columns:=Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27), _
              Header:=xlYes
      End With
  End With
  End Sub
  </code></pre>
  
  <p>And this is the file where it should be used for. Keep in mind that this file is roughly 13.000 rows.</p>
  
  <p><a href="https://i.stack.imgur.com/9dIX8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9dIX8.png" alt="enter image description here"></a></p>
  
  <p><strong>UPDATE 2</strong></p>
  
  <p>This is the CSV, for people who want to test.</p>
  
  <p><a href="http://pastebin.com/E9v41kcj" rel="nofollow noreferrer">CSV</a></p>