syntax for "IF" commend to check for multiple empty cells bf comma

C

Chris

Hi all.
I have been trying (unsuccessfully, so far) to figure out how to write
syntax to check for missing data in two cells before executing a function.
For example, I know that I can write:

“=IF(D9>0, D9-C8)â€

to check to make sure there is a valid case in cell "D9" before executing
the function, but the problem is if I have no data entered in cell "C8", it
will of course simply assume that cell contains a value of "0" and run the
function anyway. I want to write something like "If D9>0 AND C8>0, THEN
D9-C8"...

Anyone have any pointers???

Thanks in advance for your help!
- Chris
 
R

Roger Govier

Hi Chris

Another option
=IF(COUNT(D9,C8)=2,D9-C8,"")

Note that a value of 0 in either cell will return true, and the calculation
will be made, but an empty cell will return false and the result will be
null.
 

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