SUMIF Function

S

Setts

How do I use SUMIF or another function to add a column of figures based on
criteria in two adjacent columns? The criteria can be either true or false.
For example, in one instance I might want to add figures based on a match in
a Column A and B and in another instance based on a match in Column A but not
B. I am using Excel 2003.
 
S

Setts

In each case for the criteria I select two adjacent cells, one containing a
stock symbol, e.g. MSFT for Microsoft, and the other an Option symbol. When
the criteria match, in this case MSFT and blank, I want to add up a figure in
a third column. In other cases I want to add up when the stock symbol
matches and the adjacent column is NOT blank. I am familiar with the SUMIF
function but want the first two arguments to identify two columns.
 
D

Dave

Hi,
One way is with SUMPRODUCT.

With your stock symbol data in C2:C100
With your option symbol data in D2:D100
With your figures to add in E2:E100

Type the stock symbol you want as criteria into F2
Type the option symbol you want as criteria into G2

=SUMPRODUCT(--(C2:C100=F2)*(D2:D100=G2)*(E2:E100))

Regards - Dave.
 

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

Similar Threads

Help needed 0
Result based on two criteria 3
SUMIF with criteria "<>" & "=" 4
subtotal function using criteria 5
SUMIF Function 3
SUMIF Function ? 1
=sumif function 1
SUMIF and text 3

Top