# Conditional formula Excel

Discussion in 'Business Applications' started by anashq11, Jan 31, 2013.

Not open for further replies.

Joined:
Jan 31, 2013
Messages:
4
If column F equals "yes" and column H equals "Double" then I want the formula to count as 2 not 1. please see doc attached.

File size:
17.5 KB
Views:
36
2. ### Garf13LD

Joined:
Apr 17, 2012
Messages:
455
You have pretty much got it.

If there is a chance that the is a "No" and a "Double", and you don't want to count it as 1, then use this array formula.

=SUM(IF(E2:E20="Yes",IF(H2:H20="Double",2,1),0))
Use Ctrl+Shft+Enter after keying in the formula. This will add a curly brace to it.

Joined:
Jan 31, 2013
Messages:
4
I already have the code if column E is "yes" and column H is "double". I just used this code for showed: =COUNTIF(E1:E471,"Yes") + COUNTIF(H2:H20,"Double")

I'm getting a error for the sold section. IF column F is "yes" and column H is "double" then I want to add +2. I don't want to add +2 in the sold section if Column F equals "No"

4. ### lalacxb

Joined:
Feb 4, 2013
Messages:
1
Garf13LD's good answer.in formula, E need change to F for sold.
Maybe you can judge IF column F is "yes" and column H is "double" in column I, if true, you can use formula : =COUNTIF(E1:E471,"Yes") + COUNTIF(I2:I471,"True")

Joined:
Jan 31, 2013
Messages:
4
That way can be done but the employees here will have to input more info. There are columns with "Yes" but no "Double". Is there way I can input column F equals 1 and column H equals 1? therefore +2 will add up to the sold section.

Joined:
Jun 29, 2012
Messages:
518

7. ### 20_2_Many

Joined:
Jun 29, 2012
Messages:
518
Forgot to include this - I put the formula in H21, and Changed E4 to NO to verify the count. Is this what you are looking for?

#### Attached Files:

• ###### Copy of test IFS.xlsx
File size:
17.5 KB
Views:
39

Joined:
Jan 31, 2013
Messages:
4
No. The showed number should be 21. 16 + 5 Double. The sold number should be 9. 6 + 3 Double.

There are some sold that have "yes" but no double, so it should +1.

9. ### 20_2_Many

Joined:
Jun 29, 2012
Messages:
518
OK. I think I see what I did not understand in the question before. This formula:
=COUNTIFS(E2:E19,"yes",H2:H19,"Double")+ COUNTIF(E2:E19,"yes")
counts if you have a Yes AND a Double, then adds in all the original Yes, for your total of 21.

As Seen On