excel - Function to return a unique array from a range -


i looking way declare selection in memory variable 'rrange' , remove duplicates , transform array.

i have tried following:

function getarray()   dim rrange range   dim newrange range   dim resultarray() variant    set rrange = selection   newrange = rrange.removeduplicates    getarray = worksheetfunction.transpose(newrange) end function 

but getting 'type mismatch' error on .removeduplicates section, have been playing around past few hours @ , cannot right...advice?

removeduplicates not return value. need recalculate extent of range after calling method.


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

android - CollapsingToolbarLayout: position the ExpandedText programmatically -

Listeners to visualise results of load test in JMeter -