ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Using macro or other function (https://www.excelbanter.com/excel-discussion-misc-queries/168562-using-macro-other-function.html)

orquidea

Using macro or other function
 
Hi

I want to add the values of column A in 2 groups. One total would be adding
the values of the rows that have 20 on the column B and other total would be
adding the values which have 40 on the column B. The result should be 20 -
13 and 40 - 88

A B
2 20
1 40
84 40
6 20
3 40
5 20

Could anyone help me with this issue.

Thanks in advance.

Escarly


John Bundy

Using macro or other function
 
Use the SumIf function
=SUMIF(B1:B6,20,A1:A6)
change the 20 to a 40 for the other one
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"orquidea" wrote:

Hi

I want to add the values of column A in 2 groups. One total would be adding
the values of the rows that have 20 on the column B and other total would be
adding the values which have 40 on the column B. The result should be 20 -
13 and 40 - 88

A B
2 20
1 40
84 40
6 20
3 40
5 20

Could anyone help me with this issue.

Thanks in advance.

Escarly


orquidea

Using macro or other function
 
Thanks John, I rated.

"John Bundy" wrote:

Use the SumIf function
=SUMIF(B1:B6,20,A1:A6)
change the 20 to a 40 for the other one
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"orquidea" wrote:

Hi

I want to add the values of column A in 2 groups. One total would be adding
the values of the rows that have 20 on the column B and other total would be
adding the values which have 40 on the column B. The result should be 20 -
13 and 40 - 88

A B
2 20
1 40
84 40
6 20
3 40
5 20

Could anyone help me with this issue.

Thanks in advance.

Escarly



All times are GMT +1. The time now is 02:30 PM.

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