Cell Diplay


Posted by Greg Edwards on April 04, 2001 4:08 PM

Cell A1 shows 1
Cell B1 shows 2
Cell C1 shows =A1-B2
How do you get cell C1 to show nothing if either cell A1 or B1 have no value entered?

Posted by Mark W. on April 04, 2001 4:12 PM

{=IF(OR(ISBLANK(A1:B1)),"",A1-B1)}

Note: This is an array formula which must be
entered using Control+Shift+Enter. The braces,
{}, are supplied by Excel -- not entered by you.



Posted by Dave Hawley on April 05, 2001 2:13 AM

Hi Greg

I cannot see any reason to use an array formula for this. It is overkill IMO, try either of these methods:

=IF(OR(A1="",B1=""),"",A1-B1)

=IF(OR(ISBLANK(A1),ISBLANK(B1)),"",A1-B1)


Dave


OzGrid Business Applications