1

I am trying to use the if function to look at cells to the left and leave the cell blank if the reference cells are blank or calculate if they are not. for example I have E14 that im putting the formula in and C14 (projected start date)and D14 (Actual start date) as the reference cells. I need D14 to take precedence over C14.

1 Answer 1

0

What do you need to calculate? Try along these lines

=if(count(C14,D14)<2,"",C14+D14)

The If condition counts the numbers in the two cells. If there are fewer than 2 numbers, the formula returns a blank, otherwise it adds the two cells. Adjust to the calculation you need.

Edit: try

=if(count(C14,D14),if(D14>0,D14+180,C14+180),"")

Or, if the actual start date is always later than the projected start date,

=if(count(C14,D14),max(C14,D14)+180,"")

The IF statement counts the number of values. If both cells are blank, it returns a Zero and the False part will be executed.

3
  • =IF(D14>0, D14+180, IF(C14>0, C14+180, IF(C14=0, " " )))
    – chase
    Apr 20, 2015 at 20:41
  • I edited my answer with a few more suggestions.
    – teylyn
    Apr 20, 2015 at 20:52
  • =IF(COUNT(C14,D14),IF(D14>0,D14+180,C14+180),"") worked great and returns the same values as =IF(D14>0, D14+180, IF(C14>0, C14+180, IF(C14=0, " " )))
    – chase
    Apr 20, 2015 at 20:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .