Hopefully Simple Question with a Simple Explanation...PLEASE HELP!

dassassin7

New Member
Joined
Mar 4, 2014
Messages
4
Hi, I'm trying to nest an OR statement within an IF statement, with varying luck.

-----------

The following example works:

=IF(OR(H2="Apple",H2="ApplComputer",H2="APPLE CANADA DIV",H2="IPHONE",H2="MACBOOK"),"Apple”,"Other")

While the below example does not and instead returns a #NAME? error:

=IF(OR(H2="Sony",H2=“SONY Home ENTERTAINMENT DIV”),"Sony”,”Other”)

-----------

I'm really not seeing the reason for an error here because the structure and syntax used is consistent in both examples. Can't imagine caps/no caps combination has any impact...

Any help would be greatly appreciated! :)

Thanks,
D



 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Copying in your formula I had the same response. When I clicked into the formula the help text that came up didn't see that some elements of the If / then were "there". Typing it out worked. I narrowed it down to the Quote marks being different through the formula. If you use the straight sort (as in the h2="Sony" throughout the equation it works.
Hope that helps
Miles
 
Upvote 0
Hi, I'm trying to nest an OR statement within an IF statement, with varying luck.

-----------

The following example works:

=IF(OR(H2="Apple",H2="ApplComputer",H2="APPLE CANADA DIV",H2="IPHONE",H2="MACBOOK"),"Apple”,"Other")

While the below example does not and instead returns a #NAME? error:

=IF(OR(H2="Sony",H2=“SONY Home ENTERTAINMENT DIV”),"Sony”,”Other”)

-----------

I'm really not seeing the reason for an error here because the structure and syntax used is consistent in both examples. Can't imagine caps/no caps combination has any impact...

Any help would be greatly appreciated! :)

Thanks,
D





Hi,

I've had a quick look at this,

copy and pasting your Sony formula throws an error and i had to replace all the quotation marks " by deleting them and putting them back in. It then worked.

when i typed it manually from scratch it also worked fine.

Hope this helps.
 
Upvote 0

Forum statistics

Threads
1,214,965
Messages
6,122,496
Members
449,089
Latest member
Raviguru

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