# Conditional formula Excel

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

#### anashq11

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.

#### Attachments

• 17.5 KB Views: 36

#### Garf13LD

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.

#### anashq11

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"

#### lalacxb

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")

#### anashq11

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.

#### 20_2_Many

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?

#### Attachments

• 17.5 KB Views: 39

#### anashq11

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.

#### 20_2_Many

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.

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.