如何计算Excel工作表中的单词,行和图像的数量 [英] How to Count the Number of Word, Row and images in Excel sheet

查看:127
本文介绍了如何计算Excel工作表中的单词,行和图像的数量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我的要求是我必须计算excel中使用的行总数////excel中的单词总数//和excel中的图像总数.请给我一个关于excel的所有3个要求的示例代码.
急切

Hi,

My requirement is that I have to count the total number of row is used in excel // total number of word in excel // and total number of images in excel. Please, give me a sample code for all 3 requirement of excel.
its urgent

推荐答案

嗨 以下示例VBA代码可能会对您有所帮助.
Hi A sample VBA code below may be help you.
Sub countRows()
    Dim lngRowsProject As Long
    lngRowsProject = Columns("AG:AG").SpecialCells(xlVisible).Rows.Count ' returns me 21 (column AH has 21 rows, but column AG has just 2)
    lngRowsProject = Range("AG").CurrentRegion.Rows.Count ' returns me 43 (the total numbers of rows in the spreadsheet are 43)
    MsgBox "The number of rows is " & lngRowsProject
End Sub


这篇关于如何计算Excel工作表中的单词,行和图像的数量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆