View Single Post
  #14   Report Post  
Posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default Reduce duplicates to 1 with a count of how many before

Hi Howard,

Am Sat, 22 Feb 2014 10:56:51 -0800 (PST) schrieb L. Howard:

Reference to Test_CB2 which returns results to sheet 2.
Would you know why if I change all the A1's and B1's to A2 and B2 in the code it would produce these results?


the duplicate in Row 15 will not be deleted. You have to change LRow1 to
LRow1 + 1:
With Sheets("Sheet2")
.Range("A2").Resize(LRow1, 2) = myArr
.Range("A2:B" & LRow1 + 1).RemoveDuplicates _
Columns:=Array(1, 2), Header:=xlNo


Regards
Claus B.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2