[COLOR="Navy"]Sub[/COLOR] MG27Mar58
[COLOR="Navy"]Dim[/COLOR] Rng [COLOR="Navy"]As[/COLOR] Range, Dn [COLOR="Navy"]As[/COLOR] Range, n [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long,[/COLOR] Ac [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long[/COLOR]
[COLOR="Navy"]Dim[/COLOR] Lst [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long[/COLOR]
[COLOR="Navy"]Set[/COLOR] Rng = Range(Range("A2"), Range("A" & Rows.Count).End(xlUp))
[COLOR="Navy"]With[/COLOR] CreateObject("scripting.dictionary")
.CompareMode = vbTextCompare
[COLOR="Navy"]For[/COLOR] [COLOR="Navy"]Each[/COLOR] Dn [COLOR="Navy"]In[/COLOR] Rng
Lst = Cells(Dn.Row, Columns.Count).End(xlToLeft).Column
[COLOR="Navy"]For[/COLOR] Ac = 0 To Lst - 1 [COLOR="Navy"]Step[/COLOR] 2
[COLOR="Navy"]If[/COLOR] Not .exists(Dn.Offset(, Ac).Value) [COLOR="Navy"]Then[/COLOR]
.Add Dn.Offset(, Ac).Value, Dn.Offset(, Ac + 1).Value
[COLOR="Navy"]Else[/COLOR]
.Item(Dn.Offset(, Ac).Value) = .Item(Dn.Offset(, Ac).Value) _
+ Dn.Offset(, Ac + 1).Value
[COLOR="Navy"]End[/COLOR] If
[COLOR="Navy"]Next[/COLOR] Ac
[COLOR="Navy"]Next[/COLOR]
[COLOR="Navy"]Dim[/COLOR] c [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long,[/COLOR] K [COLOR="Navy"]As[/COLOR] Variant
ReDim ray(1 To .Count, 1 To 2)
[COLOR="Navy"]For[/COLOR] [COLOR="Navy"]Each[/COLOR] K [COLOR="Navy"]In[/COLOR] .Keys
c = c + 1
ray(c, 1) = K: ray(c, 2) = .Item(K)
[COLOR="Navy"]Next[/COLOR] K
Sheets("Sheet2").Range("A2").Resize(c, 2) = ray
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]With[/COLOR]
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]