Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试在 Excel 中编写一个宏来列出给定单元格范围内的唯一单词及其出现次数。
有没有最好的方法来做到这一点?
一旦你有了字典 - 遍历数组并:
Dictionary.Exists
Dictionary.Add
Dictionary(key) = Dictionary(key) + 1
之后,您将知道您有多少个唯一单词 ( Dictionary.Count),并且您可以检查每个单词的出现次数。
Dictionary.Count