This guide will discuss how to use the ** IMREAL **function in Google Sheets.

When we want to extract the real coefficient of a complex number, we can easily do this using the `IMREAL`

function in Google Sheets.

##### Table of Contents

The rules for using the `IMREAL`

function in Google Sheets are the following:

- The
`IMREAL`

function only has one argument. This is the complex number in the a+bi format. - The complex number can be entered directly as a string, or it can be a cell reference containing the complex number.
- When we input the complex number directly into the formula, we must enclose it in quotation marks.
- The input complex number can also be a value returned from another function or formula.
- The
`IMREAL`

function can also accept a simple numeric value since this is equivalent to a complex number whose imaginary coefficient is equal to 0. For example, the integer 5 is equal to the complex number 5+0i.

Google Sheets has a wide range of built-in functions dedicated to simplifying working with complex numbers, making it easier to use in different situations.

Complex numbers consist of a real and imaginary part, represented as a +bi, where a and b are real numbers, and i is an imaginary unit. Hence, the `IMREAL`

function is utilized to extract a, which is the real number of a complex number.

In this guide, we will provide a step-by-step tutorial on how to use the `IMREAL`

function in Google Sheets. Additionally, we will explore the syntax and a real example of using the function.

Great! Let’s dive right in.

**The Anatomy of the IMREAL Function**

The syntax or the way we write the `IMREAL`

function is as follows:

=IMREAL(complex_number)

**=**the equal sign is how we begin any function in Google Sheets.**IMREAL()**is our`IMREAL`

function. This function is used to extract the real coefficient of a complex number.**complex_number**is the only required argument. This refers to the complex number in the a+bi or a+bj format. Furthermore, this can be a direct value enclosed in quotation marks, a cell reference, or a result of another formula.

**Common Mistakes in Using IMREAL Function**

The `IMREAL`

function has a straightforward syntax making it simple to use. However, we still need to be careful when using some things to ensure the function properly works.

The most common issue would be inputting an invalid complex number. Several things ] may make a complex number invalid.

Firstly, we may have entered the complex number directly in the formula without quotation marks. The complex number must be entered as a string enclosed in quotation marks. For example, we will use **=IMREAL(“4+5i”)** instead of** =IMREAL(4+5i)**.

Secondly, we forgot to include the imaginary unit (i) in the complex number. Ensure to include the imaginary unit in the complex number. For instance, **=IMREAL(“4+5i”)**.

Lastly, check the syntax of the formula. Ensure the syntax of the function call is correct, including the proper placement of commas, the use of parentheses, and the quotation marks for the complex number.

**A Real Example of Using IMREAL Function in Google Sheets**

Let’s say we have a data set containing complex numbers. We want to extract the real coefficient of each complex number.

Our initial data set would look like this:

There are several ways we can input a complex number in our formula.

**Using a cell reference**

One method is to simply select a cell containing the complex number. Suppose we have a complex number in the a+bi format in cell **A2**.

This will give us the formula:

=IMREAL(A2)

**Using a complex number enclosed in quotation marks**

Another way is to directly input the complex number in the formula. Make sure to enclose the complex number in quotation marks.

This will give us the formula:

=IMREAL("8+2i")

**Using a simple number**

The `IMREAL`

function can support a simple numeric value, as this is equivalent to a complex number whose imaginary coefficient is equal to 0. For example, we have the integer 5, which is equal to the complex number 5+0i.

This would give us the formula:

=IMREAL(5)

**Using the COMPLEX function**

For situations where we only have the coefficients of the complex number, we can utilize the `COMPLEX`

function to create a complex number using the given coefficient. Then, we can use the generated complex number for the `IMREAL`

function.

This will give us the formula:

=IMREAL(COMPLEX(10,15))

Our final data set would look like this:

You can make your own copy of the spreadsheet above using the link below.

Amazing! Now we can dive into the steps of using the `IMREAL`

function in Google Sheets.

**How to Use IMREAL Function in Google Sheets**

1. First, we will create a new column in the data set to display the extracted real coefficient of the complex numbers.

2. We will select the first empty row to type in our formula. To start, we will type in an equal sign and the function name. Our formula would be “**=IMREAL(**”.

3. Then, we will simply select the cell containing the complex number. Our final formula would be “**=IMREAL(A2)**”.

4. We will press the **Enter **key to return the result.

5. In the next cell, we will directly input the complex number 8+2i. To do this, we must enclose it in quotation marks. The formula would be “**=IMREAL(“8+2i”)**”. Lastly, we will press the **Enter **key to return the result.

6. Let’s try using a simple number in our `IMREAL`

function. In this case, we simply need to input our integer. This will give us the formula “**=IMREAL(5)**”. Next, press the **Enter **key to return the result.

7. This time, we will use the `COMPLEX`

function to generate a complex number to use in our `IMREAL`

formula. To begin, we will type in the `IMREAL`

function and the `COMPLEX`

function. Our formula would be “**=IMREAL(COMPLEX(**”.

8. Next, we will type in our real and imaginary coefficients. Our final formula would be “**=IMREAL(COMPLEX(10,15))**”.

9. We will press the **Enter **key to return the result.

And tada! We have successfully used the `IMREAL`

function in Google Sheets.

You can apply this guide whenever you need to extract the real coefficient of a complex number. You can now use the `IMREAL`

function and the various other Google Sheets formulas available to create great worksheets that work for you.

**FAQs**

**1. Why did my formula return a #NUM! error? **

The `IMREAL`

function returns a #NUM! error when the given **complex_number **argument is invalid. The complex number inputted may not be recognized as a valid complex number.

Ensure the value follows the format a +bi, where a and b are real numbers, and i is an imaginary unit.

**2. Why did my formula return a #VALUE! error? **

The `IMREAL`

function returns a #VALUE! error when the given **complex_number **argument is a logical value. The function only accepts complex numbers and simple numbers.

Logical values represent a condition, such as TRUE or FALSE.

That’s pretty much it! Make sure to subscribe to our newsletter to be the first to know about the latest guides and tutorials from us.