简体   繁体   English

如果值以公式开头,则 Excel 从列中复制单元格

[英]Excel copy cell from a column if value is starting with Formula

I have this kind of column in my Excel:我的 Excel 中有这样的列:

A              B
gbgdf,  
dsfsd,
gdgdf,
TC-EVTgfdsfs,
gdfgd,

I am willing to copy every cell that is NOT starting with 'TC-EVT'我愿意复制不是以“TC-EVT”开头的每个单元格

I tried to use different formulas, such as:我尝试使用不同的公式,例如:

LOOKUP
SWITCH

but with no success at all.但根本没有成功。

I need column B to look like this:我需要 B 列看起来像这样:

gbgdf,  
dsfsd,
gdgdf,
gdfgd,

Thank you!谢谢!

Try this formula, assuming you are using either O365 or Excel 2021试试这个公式,假设您使用的是O365Excel 2021

FORMULA_解决方案

• Formula used in cell B1 • 单元格B1中使用的公式

=FILTER(A1:A5,LEFT(A1:A5,6)<>"TC-EVT")

Or,或者,

• Formula used in cell C1 • 单元格C1中使用的公式

=FILTER(A1:A5,NOT(LEFT(A1:A5,6)="TC-EVT"))

我发现完美的答案:

=FILTER(A1:A5,NOT(LEFT(A1:A5,6)="TC-EVT"))

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

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