简体   繁体   English

如何计算包含包含特定文本的单元格的行数?

[英]How to count the number of rows which contain a cell containing specific text?

I am super new to Stack Overflow so if I do anything wrong, let me know.我是 Stack Overflow 的超级新手,所以如果我做错了什么,请告诉我。

Essentially, I am trying to create a formula which will look at a row and check if any of its cells contain specific text and, if so, count the number of rows which do.本质上,我正在尝试创建一个公式,该公式将查看一行并检查其任何单元格是否包含特定文本,如果是,则计算包含的行数。 The issue I am having is that I am checking the cells not for if they equal the exact text, just if they contain it.我遇到的问题是我正在检查单元格,而不是检查它们是否等于确切的文本,只是它们是否包含它。

If any additional information or context is needed, which I am sure it is, please just let me know what you need.如果需要任何其他信息或上下文,我相信它是,请让我知道您需要什么。

if you are looking for any value and not any specific value then You can use CountA formula in this case as COUNTA simply counts the number of cells that contain any value (that is, cells that are not blank) but If you are looking for a specific text in a row then you can use COUNTIF formula.如果您正在寻找任何值而不是任何特定值,那么您可以在这种情况下使用 CountA 公式,因为 COUNTA 只是计算包含任何值的单元格的数量(即非空白的单元格),但如果您正在寻找一行中的特定文本,然后您可以使用 COUNTIF 公式。

If for example the data in a row in is A1:H1 , you could use OR(NOT(ISERROR(FIND,<search text>,A1:H1)))) .例如,如果一行中的数据是A1:H1 ,则可以使用OR(NOT(ISERROR(FIND,<search text>,A1:H1)))) FIND is case-sensitive. FIND区分大小写。 In some earlier versions on Excel, you may need to use Ctrl + Shift + Enter .在 Excel 的一些早期版本中,您可能需要使用Ctrl + Shift + Enter

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Excel VBA - 如果行数包含文本,则在单元格中输入特定文本 - Excel VBA - If number of rows contain text then enter specific text in cell 如何计算特定范围内仅包含​​数字的单元格数量,忽略文本和空单元格 - How to count the numbers of cells in specific range which contain only a number,ignoring the text and empty cells 计算具有特定文本的行数 - Count number of rows with specific text 如何计算 excel vba 中特定单元格数据的行数 - how to count the number of rows with data from a specific cell in excel vba 如何获取Excel中包含特定文本的单元格旁边的单元格的值 - How to get the value of a cell which is next to a cell containing specific text in Excel VBA代码突出显示不包含特定文本的单元格 - VBA code to highlight the cell which do not contain specific text 如何计算具有包含零的特定单元格格式的单元格? - How to count cells with a specific cell format containing zero? 如果单元格/列不包含文本,如何删除Excel中的行? - How to I delete rows in Excel if a cell/column does not contain text? 计算包含特定单词(“ Hey”)的特定行中包含特定值(“ N”)的单元格的数量 - Count the number of cells containing a specific value (“N”) in a specific row which contains a specific word(“Hey”) 包含特定文本的单元格数 - Count of cells containing specific text
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM