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
Post a Comment