Forum Discussion
dennis houle
Nov 01, 2017Copper Contributor
IF AND function
Hello, I need help with a couple formulas. In one case, If cell $C18 and $X18 both have data, then apply the formula but if either is blank, then leave the cell with the formula blank. So this i...
- Nov 01, 2017
Dennis, if with one column
=X3-IF(LEN(C3)=0,Y3,Z3)
SergeiBaklan
Nov 01, 2017Diamond Contributor
Hi Dennis,
In you formula for AND you have 4 parameters - 2 conditions and 2 empty strings. With AND you shall combine conditions only and depends on result to return empty string or formula.
In general it's more reliable to check if the cell is empty/blank checking the length of the cell, I'd suggest
=IF((LEN($C18=0))*(LEN($X18)=0),"",X18-Z18)
where multiply (*) is equivalent of AND.
Similar is for your second check.