Thanks:  0
Likes:  0

# Thread: OR Statements

1. ## OR Statements

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

2. ## Re: OR Statements

For your example you can just search for Chr as Chr is within Chrome.

3. ## Re: OR Statements

I would use

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

4. ## Re: OR Statements

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")

5. ## Re: OR Statements

to use the OR() with your example,

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

6. ## Re: OR Statements

Originally Posted by steve the fish
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?

7. ## Re: OR Statements

Originally Posted by SteveOranjin
STEVE THE FISH

How do I make those lil squiggly bars work. Control + Shift + Enter right?
In this example they will just work with ENTER.

8. ## Re: OR Statements

As an alternative:

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

## User Tag List

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•