# IF(OR function keeps giving #VALUE! result

1. ## IF(OR function keeps giving #VALUE! result

Hi,

I spent a fair amount of time yesterday to get this to work without success.
I tried with nested IF functions but got the same outcome.
Here is what I want to happen:
Cell C4 (formatted general) can have 3 different content: 1. blank, 2. the word "sell", 3. the word "buy".
The results in cell P4 (formatted currency) should be:
1. When C4 = blank, P4 = blank (not \$0.00)
2. When C4 = "sell", P4 = blank (not \$0.00)
3. When C4 = "buy", P4 = SUM(L4:O4)

This is what I finished up with:
=IF(OR(C4="",C4="sell"),"",SUM(L4:O4))

I get the right result only if C4 = "buy", both other times I always get #VALUE!

Can someone please tell me where the bug is.

George

2. ## Re: IF(OR function keeps giving #VALUE! result

Maybe you could post a workbook so we don't have to guess?

3. ## Re: IF(OR function keeps giving #VALUE! result

The obvious speculation is: that formula returning #VALUE! is importing the error from cell C4. So C4 would have the error.

If that is not the cause, then I'd have to see an example spreadsheet to dig in deeper. So, please attach one if that's the case.

4. ## Re: IF(OR function keeps giving #VALUE! result

May be you are trying do some other calculations with the outcome of the formula, so that is happening

Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

Remember to desensitize the data.

Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

5. ## Re: IF(OR function keeps giving #VALUE! result

Thanks everybody for your quick replies.

Would you believe I just fluked on the answer.
What I didn't mention before is that the result in P4, when C4 says "buy", needs to be in the negative (*-1)
I had the *-1 in the wrong place, therefore causing the error.
So all is solved and working.
With appreciation,

George

PS: can't find the spot to mark this as solved, sorry!

6. ## Re: IF(OR function keeps giving #VALUE! result

Glad you have it all sorted now...

If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

7. ## Re: IF(OR function keeps giving #VALUE! result

Sorry about this, but when I select Thread Tools, I don't get an option to mark this as solved.

Haven't done this before so not sure about the "mark as solved" process.

8. ## Re: IF(OR function keeps giving #VALUE! result

Ok, just found it, all done thanks.

##### Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1