ola1996
ola1996

Reputation: 57

how to check if number begins with "+" in excel?

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

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

I get an error #VALUE

enter image description here

Upvotes: 0

Views: 371

Answers (1)

JvdV
JvdV

Reputation: 75950

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

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

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.

Upvotes: 2

Related Questions