ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Sum only specified values (https://www.excelbanter.com/excel-discussion-misc-queries/177145-sum-only-specified-values.html)

Bob[_13_]

Sum only specified values
 
Column A Column B
Joe 100
John 300
Bob 200
George 500
John 300
Bob 250
John 125

How do I get the sum of all entries for John in a cell in Column C?



T. Valko

Sum only specified values
 
Try this:

=SUMIF(A1:A7,"John",B1:B7)

Or, use a cell to hold the criteria:

D1 = John

=SUMIF(A1:A7,D1,B1:B7)


--
Biff
Microsoft Excel MVP


"Bob" wrote in message
...
Column A Column B
Joe 100
John 300
Bob 200
George 500
John 300
Bob 250 John 125

How do I get the sum of all entries for John in a cell in Column C?





Bob[_13_]

Sum only specified values
 
Thanks, that did it!

"T. Valko" wrote in message
...
Try this:

=SUMIF(A1:A7,"John",B1:B7)

Or, use a cell to hold the criteria:

D1 = John

=SUMIF(A1:A7,D1,B1:B7)


--
Biff
Microsoft Excel MVP


"Bob" wrote in message
...
Column A Column B
Joe 100
John 300
Bob 200
George 500
John 300
Bob 250 John 125

How do I get the sum of all entries for John in a cell in Column C?






T. Valko

Sum only specified values
 
You're welcome!

--
Biff
Microsoft Excel MVP


"Bob" wrote in message
...
Thanks, that did it!

"T. Valko" wrote in message
...
Try this:

=SUMIF(A1:A7,"John",B1:B7)

Or, use a cell to hold the criteria:

D1 = John

=SUMIF(A1:A7,D1,B1:B7)


--
Biff
Microsoft Excel MVP


"Bob" wrote in message
...
Column A Column B
Joe 100
John 300
Bob 200
George 500
John 300
Bob 250 John 125

How do I get the sum of all entries for John in a cell in Column C?









All times are GMT +1. The time now is 03:08 PM.

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