Combine ISNUMBER SEARCH with AND function

Craig__

Board Regular
Joined
Feb 16, 2010
Messages
66
Hi guys

I just can’t seem to work this one out. Your help would be most appreciated.

Is it possible to combine the AND function with the following formula?

=IF(ISNUMBER(SEARCH("high",A5)),1,IF(ISNUMBER(SEARCH("moderate",A5)),1,""))

Something like this:
=IF(AND(ISNUMBER(SEARCH("high",A5)),1,IF(ISNUMBER(SEARCH("moderate",A5)),C5>"",1,"")))

What I want is a formula that says:
If A5 is found to contain the word high or moderate, and C5 is not empty, then display a value of 1, otherwise display nothing.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Ok and Rotten would also have in there boxes

Ok:Fruit
Rotten:Fruit

So i need to search the boxes for only Ok or Rotten :)

So i need exactly the same, just ignoring the :Fruit bit

thanks

dave
 
Upvote 0
Ok and Rotten would also have in there boxes

Ok:Fruit
Rotten:Fruit

So i need to search the boxes for only Ok or Rotten :)

So i need exactly the same, just ignoring the :Fruit bit

thanks

dave
Can you post some sample data and tell us what results you expect?
 
Upvote 0
Ok and Rotten would also have in there boxes

Ok:Fruit
Rotten:Fruit

So i need to search the boxes for only Ok or Rotten :)

So i need exactly the same, just ignoring the :Fruit bit

thanks

dave

Control+shift+enter, not just enter:

Either...
Rich (BB code):
=INDEX($C$2:$C$5,MATCH(LEFT(N3,FIND(":",N3)-1),
    IF($A$2:$A$5=P3,$B$2:$B$5),0))
Or...
Rich (BB code):
=INDEX({"Eat 1";"Don't eat 1";"Eat 2";"Don't eat 2"},
   MATCH(LEFT(N3,FIND(":",N3)-1),
     IF({"Bananna";"Bananna";"Apple";"Apple"}=P3,
        {"Ok";"Rotten";"Ok";"Rotten"}),0))
 
Upvote 0

Forum statistics

Threads
1,225,155
Messages
6,183,217
Members
453,151
Latest member
Lizamaison

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top