Counting numbers of times that two rows contain non simultaneously empty cells

I have a calc file with two sheets, let’s call them SHEET1 and SHEET2. The first rows of SHEET1 and SHEET2 either contains a number or is empty, lets assume that the range is A1:Z1 in both sheets. I need to count how many cells with the same positions in SHEET1 and SHEET2 are non empty at the same time. For example: if the first rows of SHEET1 and SHEET2 are

A B C D E F G
2 3 4
2 7 5 7

then the count is 2, because the 4th and 5th positions are non empty in both sheets.

Any ideas? Thanks in advance.

Hallo

=SUMPRODUCT(NOT(ISBLANK( some_range ));NOT(ISBLANK(some_other_range)))
5 Likes

That is a clever answer, thank you!