ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Sorting & Calculating (https://www.excelbanter.com/excel-discussion-misc-queries/149328-sorting-calculating.html)

Scotts

Sorting & Calculating
 
If I have a column sorted by A B C and another respective col that has
numbers in it, how could I write a function that would add up all numbers
that have a respective A in the first col?

In other words I want to Sum (if any cell in col A = A, I want to add them up)

-----------------
Scott


Toppers

Sorting & Calculating
 
=SUMPRODUCT(--(A2:A100)="A"),B2:B100)

Or

=SUMIF(A2:A100,"A",B2:B100)

"Scotts" wrote:

If I have a column sorted by A B C and another respective col that has
numbers in it, how could I write a function that would add up all numbers
that have a respective A in the first col?

In other words I want to Sum (if any cell in col A = A, I want to add them up)

-----------------
Scott


Scotts

Sorting & Calculating
 
Perfect, thank you.

-----------------
Scott



"Toppers" wrote:

=SUMPRODUCT(--(A2:A100)="A"),B2:B100)

Or

=SUMIF(A2:A100,"A",B2:B100)

"Scotts" wrote:

If I have a column sorted by A B C and another respective col that has
numbers in it, how could I write a function that would add up all numbers
that have a respective A in the first col?

In other words I want to Sum (if any cell in col A = A, I want to add them up)

-----------------
Scott



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

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