What's wrong with this code?

U

ucastores

=IF(JULY!J46>0 OR(I14>0),SUM(E25:E31)/(7),"")
I am trying to check if july and i14 are >0, and if so run the sum, if not
to leave the cell blank. I keep getting the sum argument as the answer.
i am using MS Office, Excel 2002.
I want the july and I14 as the logical test and i don't know how to do that.
 
K

Ken Snell [MVP]

Try this:

=IF(AND(JULY!J46>0,I14>0),SUM(E25:E31)/(7),"")

--

Ken Snell
<MS ACCESS MVP>

ucastores said:
=IF(JULY!J46>0 OR(I14>0),SUM(E25:E31)/(7),"")
I am trying to check if july and i14 are >0, and if so run the sum, if not
to leave the cell blank. I keep getting the sum argument as the answer.
i am using MS Office, Excel 2002.
I want the july and I14 as the logical test and i don't know how to do
that.
 
U

ucastores

That way still gives me a blank cell. I'm trying to get it to give me a ytd
average but because july's cell has a zero it's not doing that. i still need
it to give me that average with the zero added in and then divided by 7
months. The I14 cell draws from another sheet in the workbook. Does this
have anything to do with me getting the wrong answer? i used the i14 cell
cause i thought that cell would definitely let me know that there are
previous cases done for the year. I didn't use the june!j46 cell cause
sometimes it could also have a zero in it.
July's cell is zero right now. If it had a positive number in it all would
be ok, but. . .
it doesn't. hopefully you have some more suggestions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top