Multiple if Query

snash

Board Regular
Joined
Jan 12, 2006
Messages
218
I need help!

I need help with a formula (in column D) to help me determine 2 categories: Right / Wrong
If my customer name in column A contains the word "Apple" (could be variations of name, And if the country (column B) does not include "Ireland" and if the products (column C) includes "Pen" or "Marker", then call Right or else call it "Wrong".

Any ideas?

Rgds,
Shirley
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Here is one way (for an entry on row 1):
Code:
=IF(AND(ISNUMBER(SEARCH("Apple",A1)),ISNUMBER(SEARCH("Ireland",B1))=FALSE,OR(ISNUMBER(SEARCH("Pen",C1)),ISNUMBER(SEARCH("Marker",C1)))),"Right","Wrong")
 
Upvote 0
You are welcome.

Note that I use the SEARCH function, which is not Case Senstitive (do searching for "Apple" would also find "apple" and "APPLE").
If Case DOES matter, you can substitute using the FIND function (which is Case Sensitive) for all the SEARCH functions.
 
Upvote 0
Good to know. I prefer the not case sensitive as it'll pick up everything I need.
 
Upvote 0
So how would I write this if I needed a formula (in column D) to help me determine 2 categories: Right / Wrong
If my customer name in column A contains the word "Apple" (could be variations of name, And if the country (column B) does not include "Ireland" or does not include "UK", then call Right or else call it "Wrong".
 
Upvote 0
And if the country (column B) does not include "Ireland" or does not include "UK"
I think you mean "AND", not "OR". Because if it is was just "Ireland", then it does not include "UK", so your condition would return FALSE.
I think you want it to check that it contains NEITHER "Ireland" NOR "UK", right?
If so, it would look like:
Code:
=IF(AND(ISNUMBER(SEARCH("Apple",A1)),ISNUMBER(SEARCH("Ireland",B1))=FALSE,ISNUMBER(SEARCH("UK",B1))=FALSE),"Right","Wrong")
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,715
Members
448,985
Latest member
chocbudda

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