ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Using more than one column for criteria (https://www.excelbanter.com/excel-discussion-misc-queries/202689-using-more-than-one-column-criteria.html)

Lori

Using more than one column for criteria
 
Hi, I have the following question. I need to add the following:

If Column A has a "P" in it and Column B has "mbc" in it then I need Column
C to add.

Jim Thomlinson

Using more than one column for criteria
 
You can either use an array formula or sumproduct. Here is sumproduct...

=sumproduct(--($A$1:$A$10 = "P"), --($B$1:$B$10 = "mbc"), $C$1:$C$10)

Here is a link that explains the formula...

http://www.xldynamic.com/source/xld.SUMPRODUCT.html
--
HTH...

Jim Thomlinson


"Lori" wrote:

Hi, I have the following question. I need to add the following:

If Column A has a "P" in it and Column B has "mbc" in it then I need Column
C to add.


Lori

Using more than one column for criteria
 
Thank you, worked perfectly!

"Jim Thomlinson" wrote:

You can either use an array formula or sumproduct. Here is sumproduct...

=sumproduct(--($A$1:$A$10 = "P"), --($B$1:$B$10 = "mbc"), $C$1:$C$10)

Here is a link that explains the formula...

http://www.xldynamic.com/source/xld.SUMPRODUCT.html
--
HTH...

Jim Thomlinson


"Lori" wrote:

Hi, I have the following question. I need to add the following:

If Column A has a "P" in it and Column B has "mbc" in it then I need Column
C to add.



All times are GMT +1. The time now is 12:00 AM.

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