I want to calculate
=ERFC(-(LN(A7)+$A$3^2*LN(10)^2)/($A$3*LN(10)*SQRT(2)))
which I should replace by
[reformatted]
=IF((-(LN(A7)+$A$3^2*LN(10)^2)/($A$3*LN(10)*SQRT(2)))<0,
1+ERF((-(LN(A7)+$A$3^2*LN(10)^2)/($A$3*LN(10)*SQRT(2)))),
ERFC((-(LN(A7)+$A$3^2*LN(10)^2)/($A$3*LN(10)*SQRT(2)))))
or I can put in a new cell, say X9:
(-(LN(A7)+$A$3^2*LN(10)^2)/($A$3*LN(10)*SQRT(2)))
and do
=IF(X9<=0,1+ERF(X9),ERFC(X9))
The first option leads to an unreadable long equation, for the second option I
need an extra cell that ruins the layout of my worksheet. Is there a more
elegant solution?
Nibbling at the edges, look at your argument (removing unnecessary parentheses),
-(LN(A7)+$A$3^2*LN(10)^2)/($A$3*LN(10)*SQRT(2))<0
is equivalent to
(LN(A7)+$A$3^2*LN(10)^2)/($A$3*LN(10)*SQRT(2))>0
Now some algebraic reduction,
(LN(A7)+($A$3*LN(10))^2)/($A$3*LN(10)*SQRT(2))>0
(LN(A7)+($A$3*LN(10))^2)/($A$3*LN(10))>0
(LN(A7)+($A$3*LN(10))^2)/$A$3>0
Try
=1-SIGN((LN(A7)+($A$3*LN(10))^2)/$A$3)
*ERF(ABS((LN(A7)+($A$3*LN(10))^2)/($A$3*LN(10)*SQRT(2)))
which is still long, but (at least to me) not unreadably so. I doubt you could
shorten this much further without user-defined functions.