ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to create a formula that meets 2 different conditions... (https://www.excelbanter.com/excel-discussion-misc-queries/140408-how-create-formula-meets-2-different-conditions.html)

Jennifer

How to create a formula that meets 2 different conditions...
 
I have column that determines eligibility (i.e. a €œyes€ or €œno€ indicated in
each cell between C7:C13).

In a different column, I have a formula in a cell (B30) that counts between
the cells
=COUNTA(B22:B29).

In the same column, in B31, I have a number that stays constant (i.e. 1500).

In the same column, in B32, I have another formula that multiplies the two
different cells =PRODUCT(B30:B31)

What I want to do is create a formula that determines the product of cells
B30 and B31 under the following two conditions:

Only if there are 3 items counted between cells B22 and B29.
AND
Only if there is a €œyes€ indicated between cells C7 and C13.

So, for every 3 items counted and 1 €œyes,€ then multiply cells B30 and B31.
Or if there are 6 items counted and 2 €œyes,€ then multiply. Or if there are
9 items counted and 3 €œyes,€ then multiply, etc.

If it does not meet these conditions, then do not multiply B30 and B31.

I hope I havent confused anyone. Let me know if you have questions. Any
help would be greatly appreciated! Thanks in advance!

bj

How to create a formula that meets 2 different conditions...
 
=if(and(B303,countif(C7:C13)1),B30*B31,"")

"Jennifer" wrote:

I have column that determines eligibility (i.e. a €œyes€ or €œno€ indicated in
each cell between C7:C13).

In a different column, I have a formula in a cell (B30) that counts between
the cells
=COUNTA(B22:B29).

In the same column, in B31, I have a number that stays constant (i.e. 1500).

In the same column, in B32, I have another formula that multiplies the two
different cells =PRODUCT(B30:B31)

What I want to do is create a formula that determines the product of cells
B30 and B31 under the following two conditions:

Only if there are 3 items counted between cells B22 and B29.
AND
Only if there is a €œyes€ indicated between cells C7 and C13.

So, for every 3 items counted and 1 €œyes,€ then multiply cells B30 and B31.
Or if there are 6 items counted and 2 €œyes,€ then multiply. Or if there are
9 items counted and 3 €œyes,€ then multiply, etc.

If it does not meet these conditions, then do not multiply B30 and B31.

I hope I havent confused anyone. Let me know if you have questions. Any
help would be greatly appreciated! Thanks in advance!


Jennifer

How to create a formula that meets 2 different conditions...
 
Hi bj,

Thanks for your repsonse. You forumla makes sense, however when I entered
the formula I received an error message saying that Ive entered too few
arguments for this function. Am I doing something incorrect? Let me know if
you have any suggestions.

Thanks for your help,
-Jennifer

"bj" wrote:

=if(and(B303,countif(C7:C13)1),B30*B31,"")

"Jennifer" wrote:

I have column that determines eligibility (i.e. a €œyes€ or €œno€ indicated in
each cell between C7:C13).

In a different column, I have a formula in a cell (B30) that counts between
the cells
=COUNTA(B22:B29).

In the same column, in B31, I have a number that stays constant (i.e. 1500).

In the same column, in B32, I have another formula that multiplies the two
different cells =PRODUCT(B30:B31)

What I want to do is create a formula that determines the product of cells
B30 and B31 under the following two conditions:

Only if there are 3 items counted between cells B22 and B29.
AND
Only if there is a €œyes€ indicated between cells C7 and C13.

So, for every 3 items counted and 1 €œyes,€ then multiply cells B30 and B31.
Or if there are 6 items counted and 2 €œyes,€ then multiply. Or if there are
9 items counted and 3 €œyes,€ then multiply, etc.

If it does not meet these conditions, then do not multiply B30 and B31.

I hope I havent confused anyone. Let me know if you have questions. Any
help would be greatly appreciated! Thanks in advance!



All times are GMT +1. The time now is 01:18 PM.

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