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

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

java - Log4j2 configuration not found when running standalone application builded by shade plugin -

python - How do I create a list index that loops through integers in another list -