sum all cells having a not empty cell on the right

0

  |A|B
 --------------
 1|1|some text|
 2|2|         | 
 3|5|other    |

How I can sum column A, including only cells having not empty values in their right neighbour cells(B)?

In this example I would expect result to be 6, because it should only sum A1 with A3 ignoring A2, because B2 is empty.

Played around with SUMIF but can't manage it.

astropanic

Posted 2017-08-31T11:22:25.417

Reputation: 227

Answers

2

=SUMIF(B1:B3,"<>",A1:A3)

Máté Juhász

Posted 2017-08-31T11:22:25.417

Reputation: 16 807