谷歌表格

When you’re analyzing data in a spreadsheet, counting empty or blank cells could help you focus on specific areas. This is why functions like COUNTBLANK, COUNTIF, COUNTIFS, and SUMPRODUCT are so important in Google Sheets.

在分析电子表格中的数据时,对空单元格或空白单元格进行计数可以帮助您专注于特定区域。 这就是为什么COUNTBLANK,COUNTIF,COUNTIFS和SUMPRODUCT之类的功能在Google表格中如此重要的原因。

A word of warning, however. If you have a cell that contains an empty text string (“”) or has a formula that returns a similar result, this cell would be blank, but it wouldn’t technically be empty. If you want to know the number of truly empty cells, you’ll need to use a combination of the SUM, ROWS, COLUMNS, and COUNTIF functions.

但是,请注意。 如果您的单元格包含一个空的文本字符串(“”)或具有一个返回相似结果的公式,则此单元格将为空白,但从技术上来说不会为空。 如果您想知道真正空单元格的数量,则需要使用SUM,ROWS,COLUMNS和COUNTIF函数的组合。

使用COUNTBLANK (Using COUNTBLANK)

You can try the COUNTBLANK function to count the number of blank cells in a Google Sheets spreadsheet. This is the quickest way to find the number of blank, but not empty, cells.

您可以尝试使用COUNTBLANK函数来计数Google表格电子表格中的空白单元格数量。 这是查找空白而不是空单元格数量的最快方法。

Cells that contain numbers or text won’t be counted, including cells with the number zero. As we’ve mentioned, however, if a cell looks empty but contains an empty text string (“”), this will be counted.

包含数字或文本的单元格将不计算在内,包括数字为零的单元格。 但是,正如我们已经提到的,如果一个单元格看起来是空的,但是包含一个空的文本字符串(“”),则将被计算在内。

To use it, open your Google Sheets spreadsheet. Click on an empty cell and type =COUNTBLANK(range). Replace range with your cell range.

要使用它,请打开您的Google表格电子表格。 单击一个空单元格,然后输入=COUNTBLANK(range) 。 更换range与您的单元格范围。

For instance, if you wanted to count the number of blank cells between columns A and C, you’d type =COUNTBLANK(A:C).

例如,如果您想计算A列和C列之间的空白单元格数,则可以输入=COUNTBLANK(A:C)

In the example above, cells from A3 to H24 are used within the range. This range contains four blank cells (B4, C4, D4, and E4), which is the same figure COUNTBLANK reports in cell A1.

在上面的示例中,在此范围内使用了从A3到H24的单元格。 此范围包含四个空白单元格(B4,C4,D4和E4),这与单元格A1中COUNTBLANK报告的数字相同。

使用COUNTIF和COUNTIFS (Using COUNTIF and COUNTIFS)

While COUNTBLANK returns the number of blank cells, you can also use COUNTIF or COUNTIFS to achieve the same result.

虽然COUNTBLANK返回空白单元格的数量,但您也可以使用COUNTIF或COUNTIFS来获得相同的结果。

COUNTIF counts the number of cells that meet the criteria you define within the formula itself. Because you want to count empty cells, you can use a blank text string as your criteria.

COUNTIF对满足您在公式本身中定义的条件的单元格进行计数。 因为您要计算空单元格,所以可以使用空白文本字符串作为条件。

To use COUNTIF, open your Google Sheets spreadsheet and click on a blank cell. Type =COUNTIF(range,""), replacing range with your chosen cell range.

要使用COUNTIF,请打开您的Google表格电子表格,然后单击一个空白单元格。 输入=COUNTIF(range,"") ,将range替换为您选择的单元格范围。

The example above has three blank cells (B4, C4, and D4) within the range A3 to H24, with the COUNTIF function in cell A1 returning the same number of blank cells.

上面的示例在A3到H24范围内有三个空白单元格(B4,C4和D4),单元格A1中的COUNTIF函数返回相同数量的空白单元格。

The COUNTIFS function can be used as an alternative to COUNTIF. Use =COUNTIFS(range,""), replacing range with your selected cell range.

COUNTIFS函数可以替代COUNTIF。 使用=COUNTIFS(range,"") ,将range替换为您选择的单元格范围。

In the example above, four blank cells within the A3 to H24 cell range were found.

在上面的示例中,找到了A3至H24单元格范围内的四个空白单元格。

使用SUMPRODUCT (Using SUMPRODUCT)

The SUMPRODUCT function offers a slightly more complex route to counting the number of blank cells. It counts the number of cells matching certain criteria which, in this case, would be an empty text string (“”).

SUMPRODUCT函数提供了一个稍微复杂的路由来计算空白单元格的数量。 它计算符合某些条件的单元格的数量,在这种情况下,该条件将是一个空文本字符串(“”)。

To use SUMPRODUCT, open your Google Sheets spreadsheet and click on an empty cell. Type =SUMPRODUCT(--(range="")), replacing range with your chosen cell range.

要使用SUMPRODUCT,请打开您的Google表格电子表格,然后单击一个空白单元格。 键入=SUMPRODUCT(--(range="")) ,将range替换为您选择的单元格范围。

The example above shows that within the A2 to H24 cell range, two blank cells (B4 and C4) were found.

上面的示例显示,在A2至H24单元格范围内,发现了两个空白单元格(B4和C4)。

计数空单元格 (Counting Empty Cells)

All of the functions listed above count cells that are blank but which aren’t technically empty. If a function returns a null or empty result, or if you have an empty text string (“”) in a cell, then those cells are counted as blank.

上面列出的所有功能都会对空白的单元格进行计数,但从技术上讲并不是空的。 如果函数返回的结果为null或为空,或者单元格中有空文本字符串(“”),则这些单元格将被计为空白。

A workaround to this problem is to use COUNTIF to count the number of cells with a numerical value, then to use a second COUNTIF formula to count the number of cells containing text or empty text strings.

解决此问题的方法是使用COUNTIF来计算带有数值的单元格的数量,然后使用第二个COUNTIF公式来计算包含文本或空文本字符串的单元格的数量。

You can then add the results from these calculations and subtract them from the number of cells in your data range. You’ll need to know the number of cells in your range first. To find that out, you can use the ROWS and COLUMNS functions.

然后,您可以将这些计算的结果相加,然后从数据范围内的单元格数量中减去它们。 您首先需要知道您范围内的单元格数量。 要找出答案,您可以使用ROWS和COLUMNS函数。

To start, open your Google Sheets spreadsheet, click on an empty cell and type =ROWS(range)*COLUMNS(range), replacing the range value with your cell range.

首先,打开您的Google表格电子表格,单击一个空单元格,然后输入=ROWS(range)*COLUMNS(range) ,将range值替换为您的单元格范围。

In a second empty cell, type =COUNTIF(range,">=0") to count the number of cells with a numerical value. Once again, replace range with the appropriate cell range for your data.

在第二个空单元格中,键入=COUNTIF(range,">=0")来计算带有数值的单元格数。 再一次,将range替换为适合您数据的单元格范围。

To search for blank cells or cells containing text, type =COUNTIF(range,"*") in a third empty cell. Replace range as required.

要搜索空白单元格或包含文本的单元格,请在第三个空单元格中键入=COUNTIF(range,"*") 。 根据需要更换range

You can then use SUM to add up your two COUNTIF values, subtracting that figure from the number of cells in your range calculated using the ROWS and COLUMNS functions.

然后,您可以使用SUM将两个COUNTIF值相加,然后从使用ROWS和COLUMNS函数计算的范围内的单元格数量中减去该数字。

In our example, the total number of cells can be found in cell B8, the number of cells with a numerical value in B9, and the number of cells that contain text or an empty text string in B10.

在我们的示例中,可以在单元格B8中找到单元格的总数,在B9中找到具有数值的单元格的数量,在B10中找到包含文本或空文本字符串的单元格的数量。

Replacing these cell values with your own, you could use =B8-SUM(B9:10) to determine the number of truly empty cells in your range.

用自己的值替换这些单元格值,可以使用=B8-SUM(B9:10)确定范围内真正空单元格的数量。

As the example above demonstrates, in a range of 20 cells (A2 to E5), 19 cells were found to have either a number, text, or empty text string. Only one cell, E4, was completely empty.

如上面的示例所示,在20个单元格(A2至E5)的范围内,发现19个单元格具有数字,文本或空文本字符串。 只有一个单元格E4完全空了。

翻译自: https://www.howtogeek.com/447036/how-to-count-blank-or-empty-cells-in-google-sheets/

谷歌表格

谷歌表格_如何计算Google表格中的空白或空单元格相关推荐

  1. 谷歌表格删除空白表格_带有Google表格的令人印象深刻的仪表板

    谷歌表格删除空白表格 Over the years, I've used Google Sheets a few times, and usually for basic tasks. Yesterd ...

  2. wps表格日期计算天数_如何计算Google表格中两个日期之间的天数

    wps表格日期计算天数 If you want to count the number of days between two dates, you can use the DAYS, DATEDIF ...

  3. 网页抓取表格_使用Google表格进行网页抓取

    网页抓取表格 Web抓取和利用各种AP​​I是从网站和应用程序收集数据的好方法,这些数据以后可用于数据分析 . 有一家名为HiQ的公司,以网页抓取而闻名. HiQ搜寻各种"公共"网 ...

  4. Swift - 可编辑表格样例(可直接编辑单元格中内容、移动删除单元格)

    (本文代码已升级至Swift3) 本文演示如何制作一个可以编辑单元格内容的表格(UITableView). 1,效果图 (1)默认状态下,表格不可编辑,当点击单元格的时候会弹出提示框显示选中的内容. ...

  5. 使用jquery合并表格中相同文本的相邻单元格

    一.效果 二.代码 <!DOCTYPE HTML> <html> <head><title>Example</title><meta ...

  6. 表格大小设置_系统地学习Excel第18课,设置单元格字体格式

    上一篇:系统地学习Excel第17课,设置单元格格式 本篇内容结构如下: 本篇在章节中的位置 单元格字体格式包括字体.字号.字形.颜色等.Excel中文版默认单元格: 字体为[宋体]或[等线]: 字号 ...

  7. jQuery: 合并表格中相同文本的相邻单元格

    一.效果 二.代码 <!DOCTYPE HTML> <html> <head><title>Example</title><meta ...

  8. html 表格 单击,在HTML表格中单击“空”单元格

    我希望使HTML表格的所有单元格都可点击 - 即从锚点标记链接处于活动状态 - 从单元格内的任意点开始.问题在于单元没有内容.我们只是简单地使用HTML表格通过着色每个单元格的背景来直观地表示数量.要 ...

  9. 快速填充表格中的空单元格

    实例需求:工作表中的表格起始行不确定,表格行数不确定,现需要将第一列的空单元格填充当前的日期. 解决这个问题有两个核心知识点: 定位表格 定位空单元格 这种表格在VBA对象模型中属于ListObjec ...

最新文章

  1. 6款实用开源报表工具 | 码云周刊第 83 期
  2. SpringBoot应用部署于外置Tomcat容器
  3. oracle 唯一索引,唯一约束,主键之间的联系
  4. 001Python路--入门
  5. Office转PDF,Aspose太贵,怎么办?
  6. Error:Connection timed out: connect
  7. xampp php5.6 7.1共存,New XAMPP with PHP 7.2.8, 7.1.20, 7.0.31 5.6.37
  8. linux 环境变量详解,linux环境变量实例详解
  9. atom 基础使用教程
  10. Pod 的生命周期及探针
  11. linux远程控制木马,Kali Linux-使用Shellter生成远控木马并进行持久化控制
  12. 如何快速从入门到精通linux
  13. CentOS从零搭建SRS直播服务器
  14. SharePoint is Dying
  15. 已知一条斜边,求直角三角形的另外两条边
  16. 群晖服务器216j增加硬盘,群晖DS216j影视库搭建方法 | 群晖DS216j存储服务器怎么样_什么值得买...
  17. 荣耀全家桶框架插件(关联P30pro、Mate20、荣耀20pro等)
  18. 星环科技StellarDB4.0正式发布:性能数倍提升,万亿级图数据库挖掘海量数据互联价值
  19. 撤县设区,就能过城里人的生活了?
  20. 如何利用BI实现人力资源可视化管理

热门文章

  1. 哪些数学特征可以用来描述一组数据
  2. 行级标签文本格式化标签
  3. Common Language Extension(CLE) 介绍
  4. 【分享】优秀外国英文网站
  5. 输入你的密码来连接到_手机无线网络可以连接但上不了网如何解决【详解】
  6. matplotlib交互式数据光标实现——mplcursors
  7. 【系统集成项目管理工程师】信息与信息化
  8. EXCEL之工资表转工资条
  9. 找工作需要有工作经验,而没工作就没工作经验。如何理解这种死循环?
  10. 相信就能创造无限可能,捂碳星球荣获海南青创大赛一等奖