excel vba - Creating a column chart from dictionary values in VBA -
i need create column chart values have stored in dictionary (set dict = createobject("scripting.dictionary")) in vba. x-axis keys , y axis values. there way this?
try this:
public sub writedictionary() dim dict variant dim currrow integer set dict = createobject("scripting.dictionary") currrow = 1 dict.add "key 1", "data 1" dict.add "key 2", "data 2" each key in dict.keys range("a" & currrow).formula = key range("b" & currrow).formula = dict(key) currrow = currrow + 1 next key set dict = nothing end sub
if find helpful, please accept.
Comments
Post a Comment