ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   sun total of one column using criteria in another column (https://www.excelbanter.com/excel-worksheet-functions/87771-sun-total-one-column-using-criteria-another-column.html)

Ben

sun total of one column using criteria in another column
 
how do you add up a series of numbers in one column using a critera of
another column?

Column A Column B
Apples 1,112
Pears 1,548
Apples 2,544

What is the total number of apples...??? What is the right formula

if(a1:a3=Apples then add B 1:b3)


Elkar

sun total of one column using criteria in another column
 
Try the SUMIF function:

=SUMIF(A1:A3,"Apples",B1:B3)

HTH,
Elkar


"Ben" wrote:

how do you add up a series of numbers in one column using a critera of
another column?

Column A Column B
Apples 1,112
Pears 1,548
Apples 2,544

What is the total number of apples...??? What is the right formula

if(a1:a3=Apples then add B 1:b3)


Ashish Mathur

sun total of one column using criteria in another column
 
Hi,

While, sumif is definitely a better formula to use, you can also use an
array formula (Ctrl+Shift+Enter) here (i would not advise you to use an array
formula though). This is purely for your understanding

=sum(if((rangeA="Apples",RangeB))

Regards

Ashish Mathur

"Ben" wrote:

how do you add up a series of numbers in one column using a critera of
another column?

Column A Column B
Apples 1,112
Pears 1,548
Apples 2,544

What is the total number of apples...??? What is the right formula

if(a1:a3=Apples then add B 1:b3)


RAZA

sun total of one column using criteria in another column
 

In my opinion instead of deriving solutions using formulas in such type
of situation, inbuilt tool like pivot table can be used, this will
-inter alia- sum all the Apples in your database and lend you
flexibility to alter your reports any time.

REGARDS
RAZA


--
RAZA
------------------------------------------------------------------------
RAZA's Profile: http://www.excelforum.com/member.php...o&userid=34186
View this thread: http://www.excelforum.com/showthread...hreadid=540494


SwtHapa8

sun total of one column using criteria in another column
 
Hello, I have a similar issue. In my situation, I'm trying to say," If A1:A5
= CA or DE or NJ or NY or PA or WI, then sum B1:B5"

Can anyone help?

Column A Column B
CA 2
NJ 3
DE 4
SC 5
TN 6

"Elkar" wrote:

Try the SUMIF function:

=SUMIF(A1:A3,"Apples",B1:B3)

HTH,
Elkar


"Ben" wrote:

how do you add up a series of numbers in one column using a critera of
another column?

Column A Column B
Apples 1,112
Pears 1,548
Apples 2,544

What is the total number of apples...??? What is the right formula

if(a1:a3=Apples then add B 1:b3)


T. Valko

sun total of one column using criteria in another column
 
List the criteria in a range of cells.

D1:D6 = CA, DE, NJ, NY, PA, WI

Then:

=SUMPRODUCT(--(ISNUMBER(MATCH(A1:A5,D1:D6,0))),B1:B5)

--
Biff
Microsoft Excel MVP


"SwtHapa8" wrote in message
...
Hello, I have a similar issue. In my situation, I'm trying to say," If
A1:A5
= CA or DE or NJ or NY or PA or WI, then sum B1:B5"

Can anyone help?

Column A Column B
CA 2
NJ 3
DE 4
SC 5
TN 6

"Elkar" wrote:

Try the SUMIF function:

=SUMIF(A1:A3,"Apples",B1:B3)

HTH,
Elkar


"Ben" wrote:

how do you add up a series of numbers in one column using a critera of
another column?

Column A Column B
Apples 1,112
Pears 1,548
Apples 2,544

What is the total number of apples...??? What is the right formula

if(a1:a3=Apples then add B 1:b3)





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

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