Practice free

IMSUB function

IMSUB subtracts one complex number from another and returns the difference as text. A complex number is one written in x+yi form, such as 3+4i.

Example

Read it as a sentence: subtract the complex number in D2 from the one in D1, both of which are empty and counted as 0.

Practice this in the app

Syntax

IMSUB(inumber1, inumber2)

inumber1 (required)
The complex number to subtract from.
inumber2 (required)
The complex number to subtract.

Returns: The difference as text.

What Excel actually returns

Each formula below was run in desktop Excel. The result is exactly what the cell showed, errors included.

FormulaExcel showsCase
=IMSUB("3+4i","1-2i") 2+6i (3+4i)-(1-2i)
=IMSUB("3+4i","3+4i") 0 To zero
=IMSUB("3+4j","1j") 3+3j J and j
=IMSUB(5,2) 3 Numbers
=IMSUB(Data!D1,Data!D2) 0 Blank
=IMSUB("3+4i","1j") #NUM! Mixed suffix
=IMSUB("abc",1) #NUM! Invalid
=IMSUB(Data!W1:W2,"1") #VALUE! Spill

The Data sheet these formulas read

A cell that starts with = holds that formula.

Watch out for

  • Result is text.

Where it works

Excel
IMSUB is in every version of Excel from 2007 on.
Google Sheets
Same name, same behaviour for everyday use.

Part of Engineering functions. Every result on this page was measured in desktop Excel, build 16.0.20527. Last updated .