Question Locked

Working with empty cells

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
How do I tell excel that a certain calculation should be done when the data cells contributing to the formula are filled. Example, I have a cell which contains a date. Another cell contains a number. When I add the two up I should get another date. By default when no information is filled in the date cell a default value of Jan-00 is filled in that cell because the formula sees the date cell containing no value and thus equal to zero. Is it possible to adapt the formula to say that a certain function is to be carried out only if a date cell has a date in it?

3 replies

by bizzo

Instead of just adding the date and number cells together, check the sum first:

=IF(A1+B1=0,"",A1+B1)

That way, if the result is zero, it will put a blank in (the date format will show a blank) and if the result is non-zero, it will show a date.

by waltjohnson35

If first date is in col A
Added value is in col B
Result is in col C
Test for a blank cell in A to do the add.

Formulae in C =IF(A1<>"",A1+B1,"")
=IF(A2<>"",A2+B2,"")

In English- If(A is not blank,Add,Else Null)

I tried to put the values in columns but the send removes spaces. Sorry.

WaltJ

This discussion is closed to new replies.