ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   sum and if statements (https://www.excelbanter.com/excel-discussion-misc-queries/41221-sum-if-statements.html)

jimk

sum and if statements
 
I need to add A column of numbers based on the criteria in a seperate column

example
col b col c
yds passing qb number
5 10
8 5
7 10
i want to add the yds passing by qb 10 and yds passing of qb 5 in a formula
that will record them in a seperate spot in a worksheet




HiArt


Hi Jim,

try...

=SumIf(C2:C4,"=10",B2:B4)
=SumIf(C2:C4,"=5",B2:B4)

Obviously adjusting the C2:c4 and B2:B4 ranges to suit!

HTH

Art


--
HiArt
------------------------------------------------------------------------
HiArt's Profile: http://www.excelforum.com/member.php...o&userid=19953
View this thread: http://www.excelforum.com/showthread...hreadid=397129


Bob Phillips

=SumIf(C2:C4,10,B2:B4)
=SumIf(C2:C4,5,B2:B4)

is more appropriateb if they are numbers, or maybe a pivot table.

--

HTH

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


"HiArt" wrote in
message ...

Hi Jim,

try...

=SumIf(C2:C4,"=10",B2:B4)
=SumIf(C2:C4,"=5",B2:B4)

Obviously adjusting the C2:c4 and B2:B4 ranges to suit!

HTH

Art


--
HiArt
------------------------------------------------------------------------
HiArt's Profile:

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





All times are GMT +1. The time now is 10:54 AM.

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