Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 27
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   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 905
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   Report Post  
Posted to microsoft.public.excel.newusers
CM CM is offline
external usenet poster
 
Posts: 136
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   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 27
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   Report Post  
Posted to microsoft.public.excel.newusers
CM CM is offline
external usenet poster
 
Posts: 136
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   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 27
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   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 27
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",""))

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
Is it possible to find which sql statement is running? nkw Charts and Charting in Excel 0 September 8th 06 05:56 AM
If statement to find NA() Barb Reinhardt Excel Worksheet Functions 1 March 31st 06 05:50 PM
If statement to find NA() Barb Reinhardt Excel Worksheet Functions 0 March 31st 06 05:49 PM
How do I use an if statement with Find and Replace Gerald Excel Worksheet Functions 2 October 3rd 05 10:24 PM
Can't find logical_test for "if"statement John Grossman Excel Worksheet Functions 1 February 5th 05 04:34 AM


All times are GMT +1. The time now is 05:59 PM.

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

About Us

"It's about Microsoft Excel"