Add values in a column according to value in another column

  • Thread starter Thread starter Paul Kaye
  • Start date Start date
P

Paul Kaye

How can I add the values in a column according to values in another
column? If there is any value in a row in column B, I want to include
the value of the corresponding row in column A. I'm flexible as to
whether this is ANY value (i.e. not empty) or greater than zero.
 
Hi Paul
Maybe something like this =IF(B1="","",IF(B1>0,B1+A1))
Regards
Cimjet
 
=SUMPRODUCT(A1:A100,--(B1:B100<>"")) adjust the range to suit.
 
What does the -- and <> do? I really don't understand that formula!

Sorry Gary's Student - I forgot to say that it worked perfectly, I
just can't understand why!!! Could you give me a brief description?
 

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

Back
Top