The IMREAL function in Excel is a highly useful tool that extracts the real component from a complex number. This function is invaluable for users who work with complex numbers in various mathematical calculations.
Syntax
IMREAL(inumber)
- inumber: This is the complex number from which the real part will be extracted. It must be provided as a text string in the format “a + bi” or “a – bi”, where “a” is the real part and “b” is the imaginary part.
Example #1
=IMREAL("3 + 4i")
This function call would return the real part of the complex number 3 + 4i, which is 3.
Example #2
=IMREAL("-1 - 5i")
Using this function will return the real component of -1 – 5i, yielding a result of -1.
Example #3
=IMREAL("2")
In this instance, since the input is purely real (2), the function will return 2 as the output.
Error handling
- VALUE!: This error occurs when the input is not recognized as a valid complex number format.
- NAME?: This indicates that the function name has been typed incorrectly or Excel does not recognize it, often due to missing the Analysis ToolPak add-in.