ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Alpha conditional statements (https://www.excelbanter.com/excel-worksheet-functions/195461-alpha-conditional-statements.html)

Dick W.

Alpha conditional statements
 
*east does not find Northeast in the following formula:-
=if(a1="*east",a1,"")
What am I doing wrong?
Office XP
Thanks, Dick W

Peo Sjoblom[_2_]

Alpha conditional statements
 
Try

=IF(COUNTIF(A1,"*east*"),A1,"")


--


Regards,


Peo Sjoblom

"Dick W." wrote in message
...
*east does not find Northeast in the following formula:-
=if(a1="*east",a1,"")
What am I doing wrong?
Office XP
Thanks, Dick W




Mike H

Alpha conditional statements
 
Maybe

=IF(SEARCH("east",A1,1),A1,"")

Mike

"Dick W." wrote:

*east does not find Northeast in the following formula:-
=if(a1="*east",a1,"")
What am I doing wrong?
Office XP
Thanks, Dick W


Peo Sjoblom[_2_]

Alpha conditional statements
 
That will throw an error if it doesn't find anything, you have to wrap it in
either ISNUMBER or ISERR/ISERROR


=IF(ISNUMBER(SEARCH("east",A1,1)),A1,"")


--


Regards,


Peo Sjoblom

"Mike H" wrote in message
...
Maybe

=IF(SEARCH("east",A1,1),A1,"")

Mike

"Dick W." wrote:

*east does not find Northeast in the following formula:-
=if(a1="*east",a1,"")
What am I doing wrong?
Office XP
Thanks, Dick W




Dick W.

Alpha conditional statements
 
Thanks Peo and Mike your help is much appreciated.
Dick W.

"Peo Sjoblom" wrote:

That will throw an error if it doesn't find anything, you have to wrap it in
either ISNUMBER or ISERR/ISERROR


=IF(ISNUMBER(SEARCH("east",A1,1)),A1,"")


--


Regards,


Peo Sjoblom

"Mike H" wrote in message
...
Maybe

=IF(SEARCH("east",A1,1),A1,"")

Mike

"Dick W." wrote:

*east does not find Northeast in the following formula:-
=if(a1="*east",a1,"")
What am I doing wrong?
Office XP
Thanks, Dick W






All times are GMT +1. The time now is 10:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com