If And function

Copper Contributor

I would like to use an IF, AND and ISTEXT function. 

 

=IF(AND(ISTEXT(H7), ISTEXT(O14)), "Completed", =H7-90)

 

Target cell is to display H7 minus 90 days or Completed if O14 has a date

H7 is a date

O14 is a cell where a completed date is to be put

1 Reply

@Braddo777  wrote:  =IF(AND(ISTEXT(H7), ISTEXT(O14)), "Completed", =H7-90)

 

You almost got it!  The second equal sign does not belong.  Write:

 

=IF(AND(ISTEXT(H7), ISTEXT(O14)), "Completed", H7-90)

 

But I wonder if you should use OR instead of AND.   What if H7 is text, but O14 is not?

 

Also, note that ISTEXT(H7) returns FALSE if H7 is empty (no value).  In that case, the formula returns -90.  Is that okay?

 

PS....  As a wild guess, I wonder if the following works better for you:

 

=IF(AND(ISNUMBER(H7), ISNUMBER(O14)), H7-90, "Completed")