ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Conditional summation (https://www.excelbanter.com/excel-programming/301391-conditional-summation.html)

Dale[_11_]

Conditional summation
 
I'm trying to sum a column of numbers but I only want to
add numbers where a condition is satisfied. The condition
increments with the row. I can manualy grunt through the
equation but there is a limit on how long the formula can
be. Is there a way to increment a condition in a SUM?

Specifically, the equation would look like this:

=IF(BA23="y",N23,)+IF(BA24="y",N24,)+IF(BA25="y",N 25,)+IF
(BA26="y",N26,)...

Tom Ogilvy

Conditional summation
 
=sumif(BA23:BA500,"y",N23:N500)

--
Regards,
Tom Ogilvy

"Dale" wrote in message
...
I'm trying to sum a column of numbers but I only want to
add numbers where a condition is satisfied. The condition
increments with the row. I can manualy grunt through the
equation but there is a limit on how long the formula can
be. Is there a way to increment a condition in a SUM?

Specifically, the equation would look like this:

=IF(BA23="y",N23,)+IF(BA24="y",N24,)+IF(BA25="y",N 25,)+IF
(BA26="y",N26,)...




Dale[_11_]

Conditional summation
 
Thanks Tom,I knew there had to be an easy solution.
-----Original Message-----
=sumif(BA23:BA500,"y",N23:N500)

--
Regards,
Tom Ogilvy

"Dale" wrote in

message
...
I'm trying to sum a column of numbers but I only want to
add numbers where a condition is satisfied. The

condition
increments with the row. I can manualy grunt through

the
equation but there is a limit on how long the formula

can
be. Is there a way to increment a condition in a SUM?

Specifically, the equation would look like this:

=IF(BA23="y",N23,)+IF(BA24="y",N24,)+IF(BA25="y",N 25,)

+IF
(BA26="y",N26,)...



.



All times are GMT +1. The time now is 03:02 AM.

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