help me on tough sum on conditions issue

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
 
B

Bob Phillips

=SUM (IF((A1:A1001)*(D1:D100<>""),C1:C100))

which is an array formula, so commit with Ctrl-Shift-Enter

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
A

amrezzat

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

Peo Sjoblom

=SUMPRODUCT(--(A2:A50="Microsoft"),--(D2:D50<>""),C2:C50)

replace Microsoft with a cell where you put the company name or with one of
your numbers (1 for Microsoft?)

--
Regards,

Peo Sjoblom

(No private emails please)
 
B

Bob Phillips

I think I did, but I omitted an = in the formula

=SUM (IF((A1:A100=1)*(D1:D100<>""),C1:C100))

array as before.

But I get 300 not 200, I cannot see your logic for 200.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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