Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old February 14th 05, 03:27 PM
Shams
 
Posts: n/a
Default Comparison Operators for IF statement.

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.

  #2   Report Post  
Old February 14th 05, 03:35 PM
JE McGimpsey
 
Posts: n/a
Default

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)




In article ,
"Shams" wrote:

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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
What statement to use? Paul Excel Worksheet Functions 6 February 13th 05 05:23 PM
How do I fix a circular reference in a financial statement? drjayhawk25 Excel Discussion (Misc queries) 0 February 7th 05 05:19 PM
7+ nested if statement? Turi Excel Worksheet Functions 3 December 20th 04 07:55 PM
Statement lintan Excel Worksheet Functions 1 December 2nd 04 11:31 PM
IF Statement difficulty susan hayes Excel Worksheet Functions 3 November 2nd 04 09:46 PM


All times are GMT +1. The time now is 07:32 PM.

Powered by vBulletin® Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright 2004-2021 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"

 

Copyright © 2017