0
votes

screenshot

What do I do? i did hide the 0s by checking the sum, is there a better way? Yes the arrayformula gives the cell a formula so isblank() returns false right?

i just want the m column to be empty if there are no input in k, l

i tried count but apparently it counted the nonempty cells in the column

=ArrayFormula(IF(AND(COUNT(K:K)=1,count(L:L)=1), K:K+L:L, ""))

thanks all in advance!

Formulas I tried: =ArrayFormula(IF(AND(TRIM(K:K)="",TRIM(L:L)=""), , K:K+L:L)) =ArrayFormula(IF(AND(K:K="", L:L=""), , K:K+L:L)) doesn't work

=ArrayFormula(IF(K:K="", , K:K+L:L)) works except L column numbers, how do I add L to the formula?

2

2 Answers

1
votes

Solved with:

=ArrayFormula(IFERROR(IF(LEN(K:K)+Len(L:L)=0, , K:K+L:L)))

1
votes

Your original formula returned "", i.e., a zero-length text string. That is not considered a truly blank value by functions such as counta(). To get a truly blank value, use iferror(1/0) like this:

=if( "cows" = "home", "they came home!", iferror(1/0) )

Alternatively, omit the parameter altogether by entering a comma and not following with a value, as in

=if( "cows" = "home", "they came home!", )

The result will be the same although the former makes the intention clearer by explicitly showing that a null value will be returned.