ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   SUMIF (https://www.excelbanter.com/new-users-excel/40242-sumif.html)

jeremy via OfficeKB.com

SUMIF
 
I'm trying to sum column two, if column one
meets condition....

weeks tons
2 6.8
6 23.7
7 28.6
4 36.2
8 24.2
8 24.2
6 26.4
6 12.2
2 23.5

IF column 1 =2, sum column 2......


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...l-new/200508/1

Chip Pearson

Use the SUMIF function. E.g.,

=SUMIF(A1:A10,8,B1:B10)



"jeremy via OfficeKB.com" wrote in message
...
I'm trying to sum column two, if column one
meets condition....

weeks tons
2 6.8
6 23.7
7 28.6
4 36.2
8 24.2
8 24.2
6 26.4
6 12.2
2 23.5

IF column 1 =2, sum column 2......


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...l-new/200508/1




RagDyer

You can "hard code" the "2" into the formula itself:

=SUMIF(A2:A10,2,B2:B10)

OR
You could assign a cell to contain the number to match, so that you could
easily change it without having to change the formula itself:

=SUMIF(A2:A10,C1,B2:B10)

With C1 designated as the cell to contain the number to match.
--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================



"jeremy via OfficeKB.com" wrote in message
...
I'm trying to sum column two, if column one
meets condition....

weeks tons
2 6.8
6 23.7
7 28.6
4 36.2
8 24.2
8 24.2
6 26.4
6 12.2
2 23.5

IF column 1 =2, sum column 2......


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...l-new/200508/1




All times are GMT +1. The time now is 04:30 PM.

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