Compare cell = one result

A

Aaron Saulisberry

What I'd like to to is the following.

I have many rows, some with data in column A and some with data in column B.
I'd like to do is if there is data in BOTH column A AND B for the same row to
toltal those figures for the entire sheet.

I'm not sure how to write the formula to validate that there is both data in
column A AND column B. Any help is appreciated
 
V

Vito

This formula multiplies each column A by respective column B and
cumulatively sums those products only for the rows containing values in
Column A and B.

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

Adjust ranges to suit.
 
G

Govind

Hi,

You can add another column say C and enter this formula there

=IF(AND(A1<>"",B1<>""),A1+B1,0)

This formula would sumup column A and B, only when they both are not blank.

Then you can sumup column C and find out the total.

Regards

Govind.
 
A

Aaron Saulisberry

Well I hit the reply button to soon...

The formula does work but it returns the count of how many matches there are
rather than the total value of the columns that match. As always, help is
greatly appreciated.
 
Top