ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Sumif based on different values in different cells (https://www.excelbanter.com/excel-discussion-misc-queries/117201-sumif-based-different-values-different-cells.html)

stevec

Sumif based on different values in different cells
 
How do I sum only the numbers in Col B that are not associated with 0 in Col
C. That is, how do I get a sum of 40.4% (22.1+15.4+13.6). Thanks very much.


Col A Col B Col C
Cat A 10.4% 0.0%
Cat B 9.5% 0.0%
Cat C 9.5% 0.0%
Cat D 22.1% 0.1%
Cat E 12.3% 0.0%
Cat F 10.8% 0.0%
Cat G 15.4% 8.9%
Cat H 2.9% 13.6%
Cat I 3.5% 0.0%
Cat J 3.5% 0.0%



Michael

Sumif based on different values in different cells
 
SteveC, use the following formula, after adjusting the range to fit your
number of rows: =SUMIF(C2:C10,"<0",B2:B10). HTH
--
Sincerely, Michael Colvin


"SteveC" wrote:

How do I sum only the numbers in Col B that are not associated with 0 in Col
C. That is, how do I get a sum of 40.4% (22.1+15.4+13.6). Thanks very much.


Col A Col B Col C
Cat A 10.4% 0.0%
Cat B 9.5% 0.0%
Cat C 9.5% 0.0%
Cat D 22.1% 0.1%
Cat E 12.3% 0.0%
Cat F 10.8% 0.0%
Cat G 15.4% 8.9%
Cat H 2.9% 13.6%
Cat I 3.5% 0.0%
Cat J 3.5% 0.0%



stevec

Sumif based on different values in different cells
 
nevermind, thanks:

=SUMIF($G$9:$G$18,"<0",$E$9:$E$18)

I have a more difficult but related question next...

"SteveC" wrote:

How do I sum only the numbers in Col B that are not associated with 0 in Col
C. That is, how do I get a sum of 40.4% (22.1+15.4+13.6). Thanks very much.


Col A Col B Col C
Cat A 10.4% 0.0%
Cat B 9.5% 0.0%
Cat C 9.5% 0.0%
Cat D 22.1% 0.1%
Cat E 12.3% 0.0%
Cat F 10.8% 0.0%
Cat G 15.4% 8.9%
Cat H 2.9% 13.6%
Cat I 3.5% 0.0%
Cat J 3.5% 0.0%




All times are GMT +1. The time now is 06:25 AM.

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