I use the product of the logical test
and the value_if_true
instead of using an IF function when the following two conditions are satisfied:
value_if_true
is a numbervalue_if_false
is zero
When the conditions are met test*value_if_true
is equivalent to IF(test,value_if_true,if_false)
Example:
IF Function test * if_true
-----------------+------------------
=IF(TRUE,4,0) | =TRUE*4
=4 | =4
|
=IF(FALSE,4,0) | =FALSE*4
=0 | =0
Adapt for text
I want to apply a similar approach but change the value_if_true
from a number to a text string.
The two conditions would now be:
value_if_true
is a text stringvalue_if_false
is zero.
The formula test*if_true
doesn't work in this case:
=TRUE*"text" =FALSE*"text"
=#VALUE! =#VALUE!
Is there a way to adapt the formula so that it can accept values for value_if_true
that are text strings?
I want to use it in long complex formula with both text and numbers and want to make combinations using *
and +
instead of AND
and OR