## Use IF + COUNTIF to perform numerous conditions

*Article last updated on March 25, 2018*

The COUNTIF function allows you to construct a small IF formula that carries out plenty of logical expressions.

Combining the IF and COUNTIF functions also let you have more than 254 logical expressions and the effort to type the formula is minimal.

The example shown in above picture checks if the country in cell B3 is equal to one of the countries in cell range B23:D25.

In other words, the COUNTIF function counts how many times a specific value is found in a cell range.

If the value exists at least once in the cell range the IF function adds 100 to the value in C3. If FALSE the formula returns a blank.

becomes

**Cambodia**", "Sri Lanka", "Japan"; "Mongolia", "Bangladesh", "Philippines"; "Laos", "India", "Indonesia"}, "

**Cambodia**")

and returns 1. The criteria value is found once in the array (bolded).

The IF function interprets 1 as TRUE and carrys out the value_if_true argument, C3+100.

C3 is 99 and 99 + 100 equals 199, the IF function returns 199 in cell D3.

### Download excel *.xlsx file

Use IF + COUNTIF to perform multiple conditions

### Related post

If cell equals value from list

The array formula in cell C3 checks if cell B3 is equal to any of the values in E3:E5, the […]

Match two criteria and return multiple records

Question: I have a table of 3 columns (Security name, date, price) and I have to find the price of […]

5 easy ways to extract unique distinct values

You have quite a few options to choose from if you are looking for a way to create a unique […]

How to create a list of random unique numbers

Question: How do I create a random list of unique numbers from say 1 to 10, without using VBA and […]

Match two criteria and return multiple records

Question: I have a table of 3 columns (Security name, date, price) and I have to find the price of […]

Find latest date based on a condition

Table of contents Lookup a value and find max date How to enter an array formula Explaining array formula Download […]

Table of Contents Find closest value Find closest values Find closest values and return adjacent values Find closest value with […]

Nested IF statements in a formula are multiple combined IF functions so more conditions and outcomes become possible. They all are […]

If cell contains text from list

The array formula in cell C3 checks if cell B3 contains at least one of the values in List (E3:E7), […]

The easiest way to check if a cell contains a specific text string is, in my opinion, the IF and […]

### Leave a Reply

### How to comment

**How to add a formula to your comment**

<code>Insert your formula here.</code>

**Convert less than and larger than signs**

Use html character entities instead of less than and larger than signs.

< becomes < and > becomes >

**How to add VBA code to your comment**

[vb 1="vbnet" language=","]

Put your VBA code here.

[/vb]

**How to add a picture to your comment:**

Upload picture to postimage.org or imgur

Use the img tag, like this: <img src="Insert pic link here">

**Contact Oscar**

You can contact me through this contact form