help me on condition issues

A

amrezzat

heloo
if i have 5 columns like these

1 microsoft 100 50
2 sakhr
3 intel
1 microsoft 100 50
1 microsoft 100 40


and i want to sum the third column only if the forth column has a
value (for only the numer one company (microsoft) )
so the answer will be 200 not 300

thanks
 
L

Leith Ross

Hello amrezzat,

Lets say you data occupies cells A1:D5. You can use the SUMIF workshee
function to sum the cells based on your criteria.

EXAMPLE OF SUMIF
SUMIF(Test Range, Criteria, Sum Range)

In this case you place the following formula in the cell of you
choice...
=SUMIF(D4:D5, ">0", C4:C5)

Sincerely,
Leith Ros
 
A

amrezzat

you didnt get what i means
i only want to sum the numbers in third column if they only belonged to
one company(suppose company number (microsoft)) and also if the forth
column have a value in it
so in that example
the summation of microsoft is 100+100=200
 
G

Guest

I believe this will work for you:
=SUMPRODUCT(--($A$1:$A$5=1),--($D$1:$D$5<>""),($C$1:$C$5))
 
T

Tom Ogilvy

=sumproduct(--(secondcolumn="Microsoft"),--(len(trim(fourthcolumn))>0),third
column)
 

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