Comparison Operators for IF statement.

S

Shams

Folks,
I am trying to see if I can use a wildcard character type to search for a
textstring within an IF Statement. I know that I can do a filter to return
the rows of a column that meets certain criteria (including "contains",
"begins with", etc.):

If(A1 = "CA*", a1+1,0)

or
Sumif(A1:A10,"CA*", c1:e1)

Any insight will be greatly appreciated.

Regards,
Shams.
 
J

JE McGimpsey

Not sure what you're trying to do here.

If A1 starts with "CA", and is therefore text, why are you adding 1
(which will cause a #VALUE! error)???

Depending on what you're really trying to do, you might be able to use
something like:

=--(COUNTIF(A1,"CA*")>0)

to return 1 or 0.

The SUMIF() should work fine if you make the criterion and sum ranges
the same size:

=SUMIF(A1:A10,"CA*",C1:C10)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top