ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Using "or" in criteria (https://www.excelbanter.com/excel-discussion-misc-queries/223027-using-criteria.html)

Maureen

Using "or" in criteria
 
I have a formula that allows for individual criteria:

=SUM(('Test Map'!G2:G124="R")*('Test Map'!I2:I124="Anchor"))

I would like the 2nd part of the formula to allow for either "Anchor" or "A".

Any ideas how I can incorporate?

Sheeloo[_3_]

Using "or" in criteria
 
Why not use
=SUM(('Test Map'!G2:G124="R")*('Test Map'!I2:I124="Anchor"))
+ SUM(('Test Map'!G2:G124="R")*('Test Map'!I2:I124="A"))


"Maureen" wrote:

I have a formula that allows for individual criteria:

=SUM(('Test Map'!G2:G124="R")*('Test Map'!I2:I124="Anchor"))

I would like the 2nd part of the formula to allow for either "Anchor" or "A".

Any ideas how I can incorporate?


Bernie Deitrick

Using "or" in criteria
 
Use + as Or within an array formula:

=SUM(('Test Map'!G2:G124="R")*(('Test Map'!I2:I124="Anchor")+('Test Map'!I2:I124="A")))


HTH,
Bernie
MS Excel MVP


"Maureen" wrote in message
...
I have a formula that allows for individual criteria:

=SUM(('Test Map'!G2:G124="R")*('Test Map'!I2:I124="Anchor"))

I would like the 2nd part of the formula to allow for either "Anchor" or "A".

Any ideas how I can incorporate?




Shane Devenshire

Using "or" in criteria
 
HI,

I would switch from SUM to SUMPRODUCT so you don't need to array enter it:

=SUMPRODUCT(('Test Map'!G2:G124="R")*(('Test Map'!I2:I124="Anchor")+('Test
Map'!I2:I124="A")))

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Maureen" wrote:

I have a formula that allows for individual criteria:

=SUM(('Test Map'!G2:G124="R")*('Test Map'!I2:I124="Anchor"))

I would like the 2nd part of the formula to allow for either "Anchor" or "A".

Any ideas how I can incorporate?


Francis

Using "or" in criteria
 
I would prefer using Sumproduct

=SUMPRODUCT(('Test Map'!G2:G124="R")*(('Test Map'!I2:I124="Anchor")+('Test
Map'!I2:I124="A")))


--
Hope this is helpful

Pls click the Yes button below if this post provide answer you have asked


Thank You

cheers, francis










"Maureen" wrote:

I have a formula that allows for individual criteria:

=SUM(('Test Map'!G2:G124="R")*('Test Map'!I2:I124="Anchor"))

I would like the 2nd part of the formula to allow for either "Anchor" or "A".

Any ideas how I can incorporate?


Maureen

Using "or" in criteria
 
Thanks to all. Your suggestions worked.

"Bernie Deitrick" wrote:

Use + as Or within an array formula:

=SUM(('Test Map'!G2:G124="R")*(('Test Map'!I2:I124="Anchor")+('Test Map'!I2:I124="A")))


HTH,
Bernie
MS Excel MVP


"Maureen" wrote in message
...
I have a formula that allows for individual criteria:

=SUM(('Test Map'!G2:G124="R")*('Test Map'!I2:I124="Anchor"))

I would like the 2nd part of the formula to allow for either "Anchor" or "A".

Any ideas how I can incorporate?






All times are GMT +1. The time now is 05:42 PM.

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