Anil Dhawan

Edit Template
Use of IF Function in Excel: Overview, Formula & Real-Life Examples (2025 Guide)
| |

Use of IF Function in Excel: Overview, Formula & Examples

Use of IF Function by anil dhawan

IF Function

Excel has many powerful functions but IF function is one of the most dominating function we have in Excel. The function is used when you have to check or test a condition and basis on that wants to return a result in the cell.

What it does?

Function evaluate the logical test and return different result subject to whether the logical test was TRUE or FALSE.

Syntax:

=IF(logical_test, [value_if_true],[value_if_false])

Arguments

  • logical_test – This argument lets you evaluate the logical expression or the condition that you want to check. It evaluates to TRUE or FALSE Boolean values. It can either be a cell reference, a formula returning a result or supplied manually.
  • [value_if_true] – It is an optional argument and it returns when logica_test argument evaluates to
  • [value_if_false] – It is another optional argument that returns the value when logical_test evaluates to

Additional Notes:-

  • At least 1 text argument is required by function to return result

Examples : CONCATENATE function

In the following example, we have taken two words which are located in different cells in the worksheet. The simple CONCATENATE function is used to combine the values from different cells together into one cell.

Example: 1

CONCATENATE function example

Note that the above output in cell D3, doesn’t have any space between the words and both string coupled together without any delimiter which is not readable. That is because, the function join exactly what it is asked to join. It does not include any space or any delimiter between words automatically.

To add a space in between, we have to simply add another argument which holds the space in double quotes.

Example: 2

CONCATENATE function example

In the next example, we have the situation where we have the username in one column and the domain name in another column. And, we have to get them as proper email address.

Note that the following table does not have the “@” symbol which separates the user name (local part) and the domain name. So, we have added that with the help of CONCATENATE function.

Example: 3

use of CONCATENATE function

In the above example, the “@” symbol is enclosed in the quotation marks. So, in such situations, you can add any symbol or character as it is very simple to do it. 

Now, you can drag or use the fill handle to copy the function to the remaining cells in the range.

Concatenating Text String and Date Together

In the next example, we have a date in one cell which we will add it along with other text strings located in different cells.

CONCATENATE function examples

The above example shows that when the date is supplied in the argument, the functions returns number instead date. Because Excel stores dates and times as numbers and just because of cell formatting, it displayed as date and time format.

Thus, if any of the argument contains date or time, the argument must be supplied in TEXT function that is used to convert the any value to text in a specific format.

TEXT function in CONCATENATE

Note that, TEXT function is nested inside CONCATENATE which converted date serial number into date format and combine with other strings.

And if you want to display the current time, you can use NOW function along with CONCATENATE and can format time with the help of TEXT function.

CONCATENATE of TEXT function.

Note that, you can also format the text using functions according to your requirement or the way you want the final output to be.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *