get unique values as well as the empty string in excel vba -


how can modify code give empty strings in range

sub getuniqueandcount()      dim d object, c range, k, tmp string      set d = createobject("scripting.dictionary")     each c in selection         tmp = trim(c.value)         if len(tmp) > 0 d(tmp) = d(tmp) + 1     next c      each k in d.keys         debug.print k, d(k)     next k  end sub 

just remove test length of tmp , should it:

sub getuniqueandcount()      dim d object, c range, k, tmp string      set d = createobject("scripting.dictionary")     each c in selection         tmp = trim(c.value)         d(tmp) = d(tmp) + 1     next c      each k in d.keys         debug.print k, d(k)     next k  end sub 

Comments

Popular posts from this blog

SVG stroke-linecap doesn't work for circles in Firefox? -

routes - Laravel 4 Wildcard Routing to Different Controllers -

cross browser - XSLT namespace-alias Not Working in Firefox or Chrome -