# [Fixed!] IF Function Is Not Working in Excel (4 Solutions)

The sample dataset records person’s name and gender.

## Solution 1 – Remove Leading Space

A leading space is the most common reason why a formula doesn’t work properly. In the sample dataset, the IF function returns Yes for Males and No for Females. But the second output is returning the wrong result.

There’s nothing wrong with the formula.

There is a leading space in Cell C6.

Solution:

• Delete the space or use the TRIM function before the cell reference as in the image below.

### Method 2 – Change Wrong Delimiter

Another common issue is using the wrong delimiter or character.

Solution:

• Delete the incorrect delimiters and use commas between the arguments.

### Solution 3 – Change Cell Format

Entering numbers in Text format creates an error in many formulas.

There are no mistakes in the formula.

The numbers are entered in a Text format instead of a Number format.

Solution:

• To convert the numbers select the cells and click on the error icon, then select the Convert to Number option.

The formula will now return the correct result.

## Solution 4 – Remove Unusual Characters from Argument

The sample dataset returns TRUE for married persons and FALSE for unmarried persons. While inserting text in a formula double quotation marks (“”) are frequently used but some values don’t need it.

The reason for this error is the double quotation marks in the logical part, C5=”TRUE”. Excel considers the value TRUE as the number 1 and FALSE as the number 0.

Solution:

• Delete the double quotation marks from TRUE or FALSE in the formula.

Read More: How to Make Yes 1 and No 0 in Excel

You can download the free Excel workbook from here and practice independently.

Get FREE Advanced Excel Exercises with Solutions!
Md. Sourov Hossain Mithun

Md. Sourov Hossain Mithun, an Excel and VBA Content Developer at Softeko's ExcelDemy project, joined in October 2021. Holding a Naval Architecture & Marine Engineering degree from BUET, Mithun showcases expertise during his two-year tenure. With over 200 published articles on Excel topics, he earned a promotion to Team Leader, excelling in leading diverse teams. Mithun's passion extends to Advanced Excel, Excel VBA, Data Analysis, and Python programming, contributing significantly to the innovative and dynamic environment of ExcelDemy... Read Full Bio

We will be happy to hear your thoughts

Advanced Excel Exercises with Solutions PDF