View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.newusers
Ron Rosenfeld[_2_] Ron Rosenfeld[_2_] is offline
external usenet poster
 
Posts: 1,045
Default Merge/consolidate text cells based on unique keys ?

On Fri, 3 Jun 2011 06:54:19 -0700 (PDT), x13 wrote:

Wow!

Thanks to both James and Ron for your assistance.
The last version of Ron's solution has solved my problem.

PS: The placement of the resulting table seems arbitrary (not relative
to cursor position when running the macro), but I can live with it. ;)

M.T.



Glad to help. Thanks for the feedback.

With regard to the table placement, that is arbitrary but defined within the macro.

These lines near the end define the placement of the resulting table:

---------
With Range("F1", Cells(coll.Count, "G"))
.Value = vRes
.EntireColumn.AutoFit
End With
-------

You need to define a range that is the same size and shape of the resultant vRes array.

I arbitrarily chose to put it into F1:Gn where n is the number of rows in the vRes array, and should be the same as the number of entries in the coll collection.

But you can put it anyplace. Just be sure that you are only defining two columns in your resultant range.