Leaving a total sum cell blank until other cells are filled

R

Ric Crombie

Hi there, some help needed please for probably a simple problem.

Lets say I have a value in cell A1. A2 is blank for now and the total
of the SUM will be in A3.

How can i get it so that A3 is blank until A2 is filled in.

Any would be appreciated
 
P

Pete_UK

Try this in A3:

=IF(OR(A1="",A2=""),"",A1+A2)

That checks for both A1 and A2 being empty, and if either of them are
then the formula will return a blank. If you only want to test for A2,
then you can do this:

=IF(A2="","",A1+A2)

No need for SUM.

Hope this helps.

Pete
 
R

Ric Crombie

Try this in A3:

=IF(OR(A1="",A2=""),"",A1+A2)

That checks for both A1 and A2 being empty, and if either of them are
then the formula will return a blank. If you only want to test for A2,
then you can do this:

=IF(A2="","",A1+A2)

No need for SUM.

Hope this helps.

Pete

Pete, that was blooming marvellous.

Thanks for the quick easy response.

Ric
 
P

p45cal

Ric said:
Pete, that was blooming marvellous.

Thanks for the quick easy response.

Ric

Obviously too late, but if you were dealing with more than two cells
try:
=IF(SUMPRODUCT(--(ISBLANK(A1:A4)))>0,"",SUM(A1:A4))
or
=IF(SUMPRODUCT(--(NOT(ISNUMBER(A1:A4))))>0,"",SUM(A1:A4))
which will behave differently depending on whether there is text i
some cells instead of a number, or even a formula.
 

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