简体   繁体   English

如何检查excel中单元格内是否有特定文本

[英]How to check if there is a specific text inside a cell in excel

is there anyway to check if there is an existing text in excel?无论如何要检查 excel 中是否存在现有文本?

For example: COLUMN A1 - "CONSTRUCTION -RP" COLUMN B1 - "AM"例如: COLUMN A1 - “CONSTRUCTION -RP” COLUMN B1 - “AM”

I need to check if COLUMN A1 has no "OMA" on it.我需要检查 COLUMN A1 上是否没有“OMA”。 In terms:在方面:

IF (A1 has "OMA" AND B1 is "AM" OR A1 has no OMA) THEN FORMULA HERE ELSE IF (A1 has "OMA" AND B1 IS NOT "AM") THEN FORMULA HERE如果(A1 有“OMA”并且 B1 是“AM”或 A1 没有 OMA)那么这里的公式 ELSE IF(A1 有“OMA”并且 B1 不是“AM”)那么这里的公式

Here's a formula that might be of help to you.这是一个可能对你有帮助的公式。

=IF(A1="OMA", IF(B1="AM",1+1,2+2), 3+3)

Essentially 1+1, 2+2, and 3+3 would be replaced with the formulas you have if logical test 1 = true, logical test 2 = true, or if neither test held true.如果逻辑测试 1 = 真,逻辑测试 2 = 真,或者如果两个测试都不成立,则 1+1、2+2 和 3+3 将被替换为您拥有的公式。

If you have any questions about this just ask below.如果您对此有任何疑问,请在下面提问。

Use ISNUMBER(SEARCH())使用ISNUMBER(SEARCH())

=IF(OR(AND(ISNUMBER(SEARCH("OMA",A1)),B1="AM"),ISERROR(SEARCH("OMA",A1))),yourformula,yourotherformula)

=IF(OR(AND(ISNUMBER(FIND("OMA",A1)),B1="AM"),ISERROR(FIND("OMA",A1))),1,0)

Replace the 1 and 0 with your formula if true and formula if false.如果为真,则用您的公式替换 1 和 0,如果为假,则用公式替换。 In english this formula does is if either (OMA is in a1 and b1=AM) or (OMA is not in a1), then true, otherwise false在英语中,此公式的作用是,如果(OMA 在 a1 中且 b1=AM)或(OMA 不在 a1 中),则为真,否则为假

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM