sum of cells that correspond to non empty cells

N

nada

hello,
if i have two columns and i want to sum the values in each cell in each
column that correspond to a nonempty cell in the other column what should i
do?
 
L

Lars-Åke Aspelin

hello,
if i have two columns and i want to sum the values in each cell in each
column that correspond to a nonempty cell in the other column what should i
do?

One of serveral possibilities is to use the SUMPRODUCT function

=SUMPRODUCT(- - (A1:A100<>""), B1:B100)

will sum the data for the first 100 rows of column B where the
corresponding cell i column A is non empty

Hope this helps.
 
M

Mike H

You could do this

=SUMPRODUCT((ISBLANK(A1:A30))*(B1:B30))

or this depending on your definition of blank
=SUMPRODUCT((A1:A30="")*(B1:B30))

Mike
 
M

Mike H

have I misread your post you want to sum for non empty cells

=SUMPRODUCT((A1:A30<>"")*(B1:B30))

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top