A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Find and IF statement



 
 
Thread Tools Display Modes
  #1  
Old November 3rd, 2009, 09:06 PM posted to microsoft.public.excel.newusers
Atif
external usenet poster
 
Posts: 45
Default Find and IF statement

Hi:

I am using following formula to search a string and display in target cell,
if first IF condition returns TRUE it displays BCOT, if not #value! error.
any help.

=IF(SEARCH("BCOT",A2)0,"BCOT",IF(SEARCH("BCPN",A2 )0,"BCPN",""))

  #2  
Old November 3rd, 2009, 09:27 PM posted to microsoft.public.excel.newusers
Joe User[_2_]
external usenet poster
 
Posts: 757
Default Find and IF statement

"Atif" wrote:
=IF(SEARCH("BCOT",A2)0,"BCOT",IF(SEARCH("BCPN",A2 )0,"BCPN",""))


Try:

=IF(ISNUMBER(SEARCH("BCOT",A2)),"BCOT",IF(ISNUMBER (SEARCH("BCPN",A2)),"BCPN",""))


----- original message -----

"Atif" wrote in message
...
Hi:

I am using following formula to search a string and display in target
cell,
if first IF condition returns TRUE it displays BCOT, if not #value! error.
any help.

=IF(SEARCH("BCOT",A2)0,"BCOT",IF(SEARCH("BCPN",A2 )0,"BCPN",""))


  #3  
Old November 3rd, 2009, 09:41 PM posted to microsoft.public.excel.newusers
CM
external usenet poster
 
Posts: 161
Default Find and IF statement

replace your formula with this one:

=IF(ISERROR(SEARCH("BCOT",A2))=TRUE,IF(ISERROR(SEA RCH("BCPN",A2))=TRUE,"","BCPN"),"BCOT")
--
hope to help,
cm


"Atif" wrote:

Hi:

I am using following formula to search a string and display in target cell,
if first IF condition returns TRUE it displays BCOT, if not #value! error.
any help.

=IF(SEARCH("BCOT",A2)0,"BCOT",IF(SEARCH("BCPN",A2 )0,"BCPN",""))

  #4  
Old November 3rd, 2009, 10:04 PM posted to microsoft.public.excel.newusers
Atif
external usenet poster
 
Posts: 45
Default Find and IF statement

Can we add more conditions?

"cm" wrote:

replace your formula with this one:

=IF(ISERROR(SEARCH("BCOT",A2))=TRUE,IF(ISERROR(SEA RCH("BCPN",A2))=TRUE,"","BCPN"),"BCOT")
--
hope to help,
cm


"Atif" wrote:

Hi:

I am using following formula to search a string and display in target cell,
if first IF condition returns TRUE it displays BCOT, if not #value! error.
any help.

=IF(SEARCH("BCOT",A2)0,"BCOT",IF(SEARCH("BCPN",A2 )0,"BCPN",""))

  #5  
Old November 3rd, 2009, 10:26 PM posted to microsoft.public.excel.newusers
CM
external usenet poster
 
Posts: 161
Default Find and IF statement

you can nest up to 7 if statements; if you need more conditions, there will
need to be a different solution.
--
hope to help,
cm


"Atif" wrote:

Can we add more conditions?

"cm" wrote:

replace your formula with this one:

=IF(ISERROR(SEARCH("BCOT",A2))=TRUE,IF(ISERROR(SEA RCH("BCPN",A2))=TRUE,"","BCPN"),"BCOT")
--
hope to help,
cm


"Atif" wrote:

Hi:

I am using following formula to search a string and display in target cell,
if first IF condition returns TRUE it displays BCOT, if not #value! error.
any help.

=IF(SEARCH("BCOT",A2)0,"BCOT",IF(SEARCH("BCPN",A2 )0,"BCPN",""))

  #6  
Old November 3rd, 2009, 10:29 PM posted to microsoft.public.excel.newusers
Atif
external usenet poster
 
Posts: 45
Default Find and IF statement

Yes, I need more conditions.

"cm" wrote:

you can nest up to 7 if statements; if you need more conditions, there will
need to be a different solution.
--
hope to help,
cm


"Atif" wrote:

Can we add more conditions?

"cm" wrote:

replace your formula with this one:

=IF(ISERROR(SEARCH("BCOT",A2))=TRUE,IF(ISERROR(SEA RCH("BCPN",A2))=TRUE,"","BCPN"),"BCOT")
--
hope to help,
cm


"Atif" wrote:

Hi:

I am using following formula to search a string and display in target cell,
if first IF condition returns TRUE it displays BCOT, if not #value! error.
any help.

=IF(SEARCH("BCOT",A2)0,"BCOT",IF(SEARCH("BCPN",A2 )0,"BCPN",""))

  #7  
Old November 4th, 2009, 04:40 PM posted to microsoft.public.excel.newusers
Atif
external usenet poster
 
Posts: 45
Default Find and IF statement

Thank you!

following statement worked for me:
=IF(ISERROR(FIND("YSC",AO2)),IF(ISERROR(FIND("MHO" ,AO2)),IF(ISERROR(FIND("WCC",AO2)),IF(ISERROR(FIND ("BCOT",AO2)),IF(ISERROR(FIND("SCC",AO2)),IF(ISERR OR(FIND("BMTT",AO2)),"","BMTT"),"SCC"),"BCOT"),"WC C"),"MHO"),"YSC")

"cm" wrote:

you can nest up to 7 if statements; if you need more conditions, there will
need to be a different solution.
--
hope to help,
cm


"Atif" wrote:

Can we add more conditions?

"cm" wrote:

replace your formula with this one:

=IF(ISERROR(SEARCH("BCOT",A2))=TRUE,IF(ISERROR(SEA RCH("BCPN",A2))=TRUE,"","BCPN"),"BCOT")
--
hope to help,
cm


"Atif" wrote:

Hi:

I am using following formula to search a string and display in target cell,
if first IF condition returns TRUE it displays BCOT, if not #value! error.
any help.

=IF(SEARCH("BCOT",A2)0,"BCOT",IF(SEARCH("BCPN",A2 )0,"BCPN",""))

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:38 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.