IMSEC Function

Returns the secant of a complex number.

Category

Engineering

Available in

Excel 2013+, Microsoft 365

Returns

Complex number text

Want to practice IMSEC in a real spreadsheet? Open a blank sheet in our Practice Sandbox and try it with live data, with the AI Excel tutor beside you. No Excel needed — just a free account.Try it free in the Sandbox

Overview

IMSEC returns sec(z) = 1 ÷ cos(z).

Angles are in radians. For a real number the answer matches the ordinary function (for example IMSIN("1") equals SIN(1)), but these versions also accept complex inputs.

The result is text, shown to 15 significant digits. Wrap it in IMREAL or IMAGINARY to get a number you can format or round.

Syntax

=IMSEC(inumber) Explain

Arguments

ArgumentRequired?What it does
inumberYesA complex number as text, like "3+4i" — or a plain number.

Examples

Example 1 — Worked examples

Each row applies the function to the value in column A.

B2fx=IMSEC(A2)
AB
1Complexsec(z)
24+3i-0.0652940278579471-0.0752249603027732i
301
4i0.648054273663885
=IMSEC(A2) Explain

Common mistakes

  • #NUM! The text isn't a valid complex number — for example a space ("3 + 4i"), a capital I, or a letter other than i or j.

Notes

Kyle Stott

Author

Kyle Stott

Certified Microsoft Excel Expert

Kyle has worked professionally with Microsoft Excel for over a decade and has consulted on and taught Excel best practices to over 400 companies across 30+ countries.