Engineering function

IMSUB function

Subtracts one complex number from another, for example "13+4i" minus "5+3i" gives "8+i".

Available in Excel 2007 and later (Excel 2003 needed the Analysis ToolPak add-in), Microsoft 365, Excel for the web, Excel for Mac

Excel 2007 and laterWorks in Google Sheets

Syntax

IMSUB(inumber1, inumber2)
ArgumentWhat it means
inumber1RequiredThe complex number to subtract from.
inumber2RequiredThe complex number to subtract.

Returns: A complex number as text.

How IMSUB works

IMSUB subtracts the second complex number from the first, part by part: real minus real and imaginary minus imaginary. It is needed because the ordinary minus sign does not work on complex text.

Use it to find the voltage across a component (supply phasor minus the drop elsewhere), the difference between two vectors, or the error between a measured and a modelled response. Like all IM functions, it reads complex numbers written as text (x+yi or x+yj) and returns its answer as text with up to 15 significant digits, so you can feed the result straight into another IM function.

Examples

1Subtract complex numbers

C2fx=IMSUB(A2, B2)
ABC
1z1z2
213+4i5+3i8+i

Result: 8+i

13 − 5 = 8 and 4 − 3 = 1, so the result is 8+i.

2Voltage left for the load

C2fx=IMSUB(A2, B2)
ABC
1Supply (V)Cable drop (V)
22306.5+2.1i223.5-2.1i

Result: 223.5-2.1i

A real 230 V supply minus a cable drop of 6.5+2.1i volts leaves 223.5−2.1i volts across the load; =IMABS(C2) gives its magnitude.

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 13 KB

Common errors and how to fix them

ErrorWhy it happensFix
#NUM!The text is not a valid complex number — for example it contains spaces (3 + 4i), a capital I, or a misplaced sign.Create the value with COMPLEX or remove spaces with SUBSTITUTE.
#VALUE!The argument is a logical value, or the formula mixes the i and j suffixes.Use one suffix consistently throughout a calculation.

Tips

  • IMSUB takes exactly two arguments. To subtract several, use =IMSUB(A2, IMSUM(B2:B5)).

Google Sheets

IMSUB also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.

IMSUB in other languages

In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.

LanguageFunction name
DanishIMAGSUB
DutchC.VERSCHIL
FinnishKOMPLEKSI.EROTUS
FrenchCOMPLEXE.DIFFERENCE
HungarianKÉPZ.KÜL
ItalianCOMP.DIFF
PolishRÓŻN.LICZB.ZESP
Portuguese (Brazil)IMSUBTR
Portuguese (Portugal)IMSUBTR
RussianМНИМ.РАЗН
SpanishIM.SUSTR
SwedishIMDIFF
TurkishSANTOPLA