ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   help me on condition issues (https://www.excelbanter.com/excel-programming/345584-help-me-condition-issues.html)

amrezzat[_3_]

help me on condition issues
 

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


--
amrezzat
------------------------------------------------------------------------
amrezzat's Profile: http://www.excelforum.com/member.php...o&userid=28766
View this thread: http://www.excelforum.com/showthread...hreadid=485028


Leith Ross[_283_]

help me on condition issues
 

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

--
Leith Ros
-----------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...fo&userid=1846
View this thread: http://www.excelforum.com/showthread.php?threadid=48502


amrezzat[_4_]

help me on condition issues
 

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


--
amrezzat
------------------------------------------------------------------------
amrezzat's Profile: http://www.excelforum.com/member.php...o&userid=28766
View this thread: http://www.excelforum.com/showthread...hreadid=485028


Kleev

help me on condition issues
 
I believe this will work for you:
=SUMPRODUCT(--($A$1:$A$5=1),--($D$1:$D$5<""),($C$1:$C$5))

"amrezzat" wrote:


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


--
amrezzat
------------------------------------------------------------------------
amrezzat's Profile: http://www.excelforum.com/member.php...o&userid=28766
View this thread: http://www.excelforum.com/showthread...hreadid=485028



Tom Ogilvy

help me on condition issues
 
=sumproduct(--(secondcolumn="Microsoft"),--(len(trim(fourthcolumn))0),third
column)

--
Regards,
Tom Ogilvy

"amrezzat" wrote in
message ...

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


--
amrezzat
------------------------------------------------------------------------
amrezzat's Profile:

http://www.excelforum.com/member.php...o&userid=28766
View this thread: http://www.excelforum.com/showthread...hreadid=485028





All times are GMT +1. The time now is 07:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com