SteveOranjin

Board Regular
Joined
Dec 18, 2017
Messages
170
Hello,

I'd like to understand how to make OR statements within a formula. What I'm aiming to do is have a formula evaluate more than one condition and provide the same result if A or B is true.

Example:

=IF(ISNUMBER(FIND("Chrome",F2)),"Chrome","0")

I've advanced a little bit in the last month or so with Formulas so I've been experimenting with making formulas work on my own more. What I can't get working though is,

=IF(ISNUMBER(FIND("Chrome",F2,OR("Chr",F2))),"Chrome","0")

What i'd like to see happen is this formula evaluate F2 for both "Chrome" and "Chr" and if either of those conditions is evaluated as true then I would like it to return "Chrome". I don't want to have to write two complete arguments to do that though. I'd like it to evaluate both of those within one statement.

Hope you are well,

Steve
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
For your example you can just search for Chr as Chr is within Chrome.
 
Upvote 0
If you did need an OR in there you could use:

=IF(OR(ISNUMBER(FIND({"Chr","Chrome"},F2))),"Chrome","0")

or not case sensitive:

=IF(OR(ISNUMBER(SEARCH({"Chr","Chrome"},F2))),"Chrome","0")
 
Upvote 0
to use the OR() with your example,

=IF(OR(ISNUMBER(FIND("Chr",F2)),ISNUMBER(FIND("Chrome",F2))),"Chrome","0")
 
Upvote 0
If you did need an OR in there you could use:

=IF(OR(ISNUMBER(FIND({"Chr","Chrome"},F2))),"Chrome","0")

or not case sensitive:

=IF(OR(ISNUMBER(SEARCH({"Chr","Chrome"},F2))),"Chrome","0")

STEVE THE FISH

How do I make those lil squiggly bars work. Control + Shift + Enter right?
 
Upvote 0
As an alternative:

=IF(COUNT(SEARCH({"Chr","Chrome"},F2)),"Chrome","0")
 
Upvote 0

Forum statistics

Threads
1,213,527
Messages
6,114,144
Members
448,552
Latest member
WORKINGWITHNOLEADER

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