View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
marcus[_3_] marcus[_3_] is offline
external usenet poster
 
Posts: 140
Default List unique items

Hi Robert

Remove these lines from your procedure

' w = dic(a(i, 1)): w(nCol) = Val(w(nCol)) + Val(a(i,
nCol))
' dic(a(i, 1)) = w

They seem to be getting in the road of the efficient running of your
code. In testing the a = .value picks up the variable row length so
you don't need this line either

nRows = ws1.UsedRange.Rows.Count

I sent up a range of varying lengths and column widths, ran several
tests and the code seemed to cope well with this provided the above
was removed. However my test data may look completely different to
yours.

Take care

Marcus