1

How can I evolve =COUNTIF(A:A;"foobar") so that if the cell in column A is empty, it looks (for the "foobar") in column B?

2 Answers 2

5

=COUNTIF(A:A;"foobar")+COUNTIFS(A:A;"";B:B;"foobar")

0
0

You may use this formula also:

=IF(COUNTIF(A2:A7,"Foobar")=0,COUNTIF(B2:B7,"Foobar"),COUNTIF(A2:A7,"Foobar"))

Adjust cell references in the formula as needed.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .