本文介绍了如何检查数字是否以"+"开头在Excel中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要检查数字是否以" +或" 00或"(开头,但是当我尝试使用以下形式时:

I need to check if a number begins with "+" or "00" or "(" but when I try with this formule:

=IF(LEFT(E4="+",1),1,0)

我收到错误#VALUE

推荐答案

尝试在COUNTIF中包含包含通配符的OR逻辑,并在IF中使用该逻辑:

Try to include OR logic including a wildcard in a COUNTIF and use that in an IF:

=IF(SUM(COUNTIF(E2,{"+*","(*","00*"})),"This","That")

如果在+前面有前导空格,则只需在条件之前添加一个空格.我想您还可以添加其他条件,例如" +*.不幸的是,TRIM()COUNTIF中无法使用.

If you got leading spaces in front of the + then just add a space before the criteria. I guess you could also add another criteria like " +*. Unfortunately TRIM() won't work within a COUNTIF.

这篇关于如何检查数字是否以"+"开头在Excel中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-25 03:54