使用VBA统计Excel中字符个数.docVIP

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
  4. 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
  5. 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们
  6. 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
  7. 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
电 脑 与 信 息 技 术 2011 年 8 月第 19 卷第 4 期201 1 年 8 月电脑 与信息技术Vol.19 No.4Computer and Informatio 电 脑 与 信 息 技 术 2011 年 8 月 第 19 卷第 4 期 201 1 年 8 月 电 脑 与 信 息 技 术 Vol.19 No.4 Computer and Information Technology Aug. 2011 文章编号:1005-1228(2011)04-0072-04 使用 VBA 统计 Excel 中字符个数 张焱,张金宝 交通运输部管理干部学院,河北 廊坊 065201 摘 要:通过菜单操作,统计 Excel 文中字数非常麻烦,而借助 Excel VBA 可方便快捷的统计单个 Excel 文件的字符个数、 多个 Excel 文件的字符个数。将所有需统计的 Excel 文件放到一个文件夹下,使用文中提供的程序即可完成字数统计,并能 将含有文件名及对应字符个数的统计结果存放到 Excel 文件中。 关键词:Excel;Excel VBA;统计字符个数 中图分类号:TP311 文献标识码:A Counting Number of Char acter s in Excel Files by Excel VBA ZHAN G Yan, ZHAN G Jin- bao (Management Institute of Ministry of Transport of the Peoples Republic of China, Lang Fang 065201, China) Abstr act:Through menu operation, counting text words in Excel is very difficult, and statistics the total number of characters by using Excel VBA can be convenient in a single Excel file and multiple Excel files. All the required operation is gathering Excel files into a folder, using the procedures provided in this article to complete counting number of all words, and then putting results of the number of characters into Excel file and storing the file in your file system. In the Excel file, you can find each file name in the directory number of all words in each file. Key wor ds: Excel;Excel VBA;words count which you count the number of words above and the total 在日常工作中,大家经常需要统计 Excel 文档的 字数。如果是 Word 类型的文档,借助于 Word 自身提 供的字数统计功能,很容易就可获得文档的总字数。然 而,如果是 Excel 格式的文档材料,由于 Excel 没有像 Word 那样提供统计文档字数的简单菜单操作,在 Ex- cel 统计文字个数成为一个较为繁琐的问题。为方便大 家统计 Excel 文档字数,笔者通过数组公式、VBA(Vi- sual Basic For Application) 两种方式统计 Excel 文中字 数。 1 使用数组公式统计 Excel 字符的个数 Excel 中公式功能很强大,理论上,可通过公式完 成任何运算操作,例如求和运算、均值运算、逻辑运算 等。Excel 提供了种类和数量众多的函数(这些函数其 实是 Excel 预定义的公式),通过组合这些函数,可完 成较为复杂的公式运算。如果 Excel 提供的函数无法 完成所需的运算,那么还可通过自定义公式来完成。 Excel 没有直接提供统计 Excel 字符总数的函数,需要 组合 Excel 中的一些函数来完成字数统计,并且统计 Excel 字符总数往往涉及到多个单元格,需结合使用 Excel 中的数组公式才可完成字数统计。 1. 1 什么是数组公式 普通公式只占用

文档评论(0)

153****9595 + 关注
实名认证
文档贡献者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档