一般使用for each语句遍历,例如:
Dim db,k,v,iset db = createobject("scripting.dictionary")for i=1 to 10 k=cells(i,1) v=cells(i,2) db(k)=db(k)+vnext ii=1for each k in db.keys v=db(k) cells(i,4)=k cells(i,5)=v i=i+1next k