IMCSCH Function in Excel

Sumit Bansal
Written by

Sumit Bansal is the founder of TrumpExcel.com and a 13-time Microsoft Excel MVP. He started this site in 2013 to share his passion for Excel through easy tutorials, tips, and training videos, helping you master Excel, boost productivity, and maybe even enjoy spreadsheets!

The IMCSCH function in Excel returns the hyperbolic cosecant of a complex number. You give it a value like 4+3i, and it gives you the answer as another complex number.

The hyperbolic cosecant is 1 divided by the hyperbolic sine, and you’ll mostly run into it in math and engineering formulas.

Just like its input, IMCSCH gives you that complex number back as text. So you can’t round it with the ROUND function or format it like a regular number without an extra step.

In this article, I’ll show you how to use IMCSCH with six examples, including how to run it on a whole column with one formula and how to round its long results.

Follow along with the example file

IMCSCH Function Examples.xlsx

Download

IMCSCH Function Syntax

Here is the syntax of the IMCSCH function:

=IMCSCH(inumber)
  • inumber – The complex number you want the hyperbolic cosecant of.

The inumber argument takes a complex number written as text, like “4+3i” or “4+3j”, or a cell that holds one. When you type a complex number straight into the formula, put it in double quotes, so =IMCSCH("4+3i") returns -0.036275889628626-0.0051744731840194i.

You can also give it a regular number. IMCSCH treats it as a complex number with no imaginary part, so =IMCSCH(2) returns 0.275720564771783.

The IMCSCH function works in Excel for Microsoft 365, Excel 2024, 2021, 2019, 2016, and Excel for Mac.

When to Use the IMCSCH Function

Use this function when you need to:

  • Find the hyperbolic cosecant of complex numbers in a math or engineering worksheet
  • Check homework or textbook answers that involve the hyperbolic cosecant of a complex number
  • Work through electrical engineering formulas, like transmission line equations, that use the hyperbolic cosecant
  • Calculate the hyperbolic cosecant when the real and imaginary parts sit in separate columns

Let me show you a few practical examples of how to use the IMCSCH function.

Example 1: Find the Hyperbolic Cosecant of a Complex Number

Let’s start with a simple example.

Below is a practice set of complex numbers written in different ways, and I want to find the hyperbolic cosecant of each one in column C.

Practice set of complex numbers in different forms with an empty Hyperbolic Cosecant column

Here is the formula to enter in cell C2 and copy down:

=IMCSCH(B2)
IMCSCH formula in C2 copied down returns the hyperbolic cosecant of each complex number

IMCSCH takes the complex number in B2 and returns its hyperbolic cosecant, so 4+3i gives -0.036275889628626-0.0051744731840194i. The result is also a complex number written as text, with a long string of decimals in each part.

Notice how the results follow the inputs:

  • Problems 3 and 4 (i and 2i) have no real part, so their results have no real part either.
  • Problem 5 is a plain 2, so the result is a plain number with no i at all.
  • Problem 7 uses j instead of i, and IMCSCH keeps the j in its result.
  • Problems 1 and 9 (4+3i and -4-3i) are negatives of each other, and so are their results.

I’ve kept this first example as a per-row formula so you can see what IMCSCH does with each kind of input. The next example handles a whole column with one formula.

Example 2: Use IMCSCH on a Whole Column with One Formula

In Excel 365 (and Excel 2021 or later), you can get the hyperbolic cosecant of a whole column with a single formula, but IMCSCH needs one small trick to do it.

Below is a homework sheet where each student got a different complex number, and I want to build the answer key in column C.

Homework sheet with each student's assigned complex number, an empty Answer Key column and an empty Result cell in F2

The obvious formula would be to give IMCSCH the whole range. I’ve put that attempt in cell F2, and it returns a #VALUE! error:

=IMCSCH(B2:B11)
IMCSCH with a plain range in F2 returns the #VALUE! error

This happens because IMCSCH can’t take a multi-cell range reference like B2:B11. It only works with single values, or with a list of values held in memory (called an array).

Putting a plus sign (+) in front of the range fixes this, because Excel then hands IMCSCH the values as an array. Here is the formula that works:

=IMCSCH(+B2:B11)
IMCSCH with a plus sign before the range in C2 spills the answer key for every student

Enter this in cell C2, and it spills the answers down to C11. Mario’s 2+i gives 0.141363021612408-0.228375065599687i, and Emma’s 3i gives a purely imaginary answer, -7.08616739573719i.

Important: Use just the plus sign here. Adding +0 or a double minus (–) to the range also creates an array, but it tries to turn the text into numbers first, so every complex number returns #VALUE!.

The same plus-sign trick works for other functions that won’t spill when you give them a range.

If you are using Excel 2019 or earlier, enter the below formula in cell C2 and then copy it down the range:

=IMCSCH(B2)

Example 3: Calculate IMCSCH from Separate Real and Imaginary Parts

Sometimes you don’t have the complex number in a single cell, so you need to build it first.

Below is a list where the real and imaginary parts of each complex number are in separate columns, and I want the hyperbolic cosecant in column C.

Real parts and imaginary parts in separate columns with an empty Hyperbolic Cosecant column

Here is the formula to enter in cell C2:

=IMCSCH(COMPLEX(+A2:A11,+B2:B11))
IMCSCH with COMPLEX in C2 builds each complex number and spills its hyperbolic cosecant

The COMPLEX function joins each real part and imaginary part into one complex number, so 1 and 1 become 1+i. IMCSCH then returns the hyperbolic cosecant of each one, and the results spill down to C11.

COMPLEX doesn’t accept a multi-cell range either, so both ranges need the plus sign. Without it, the formula returns a #VALUE! error.

Rows 6 and 7 show what happens when one part is 0. A real part of 0 gives a purely imaginary result, and an imaginary part of 0 gives a plain number.

If you want j in the results instead of i, add “j” as the third argument of COMPLEX, like COMPLEX(+A2:A11,+B2:B11,"j").

If you are using Excel 2019 or earlier, enter the below formula in cell C2 and then copy it down the range:

=IMCSCH(COMPLEX(A2,B2))

Example 4: Round IMCSCH Results to Fewer Decimals

IMCSCH results come with a lot of decimals, which makes them hard to read and compare. Here’s how to round them.

Below is a list of complex numbers, and I want to get the hyperbolic cosecant in column B and a rounded version with four decimal places in column C.

List of complex numbers with empty Hyperbolic Cosecant and Rounded columns

Here is the formula to enter in cell B2:

=IMCSCH(+A2:A11)
IMCSCH in B2 spills full-precision results with long decimals

This spills the full results down to B11, and they’re long. For 1+2i, you get -0.221500930850509-0.6354937992539i.

You can’t fix this with the ROUND function directly, because the result is text and ROUND returns a #VALUE! error. Instead, round the real and imaginary parts separately and join them back into a complex number.

Here is the formula to enter in cell C2:

=COMPLEX(ROUND(IMREAL(+B2#),4),ROUND(IMAGINARY(+B2#),4))
COMPLEX with ROUND, IMREAL and IMAGINARY in C2 rounds each result to four decimals

How this formula works:

  • B2# refers to the whole spilled result in column B (B2:B11). It needs the plus sign too, because the IMREAL and IMAGINARY functions don’t accept a multi-cell range either.
  • IMREAL(+B2#) and IMAGINARY(+B2#) pull out the real and imaginary parts of each result as regular numbers.
  • ROUND(…,4) rounds each part to four decimal places.
  • COMPLEX(…) joins the rounded parts back into a complex number.

Now 1+2i shows -0.2215-0.6355i. Excel drops trailing zeros, which is why -1+1.5i shows -0.035-0.6478i and not -0.0350-0.6478i.

Pro Tip: If you only need the rounded results, you can skip column B and do it all in one cell with the LET function: =LET(r,IMCSCH(+A2:A11),COMPLEX(ROUND(IMREAL(r),4),ROUND(IMAGINARY(r),4))). LET needs Excel 2021 or later.

If you are using Excel 2019 or earlier, enter the below formula in cell B2 and then copy it down the range:

=IMCSCH(A2)

And for the rounded results, enter the below formula in cell C2 and then copy it down the range:

=COMPLEX(ROUND(IMREAL(B2),4),ROUND(IMAGINARY(B2),4))

Example 5: IMCSCH vs CSCH for Regular Numbers

IMCSCH accepts regular numbers too, so it’s tempting to use it for them. But for numbers with no imaginary part, the CSCH function is the better choice, and this example shows why.

Below is a list of regular numbers, and I want to compare the IMCSCH result in column B with the CSCH result in column C.

List of regular numbers with empty IMCSCH Result and CSCH Result columns

Here is the IMCSCH formula to enter in cell B2:

=IMCSCH(+A2:A11)
IMCSCH in B2 returns text results that ignore the four-decimal number format

The values are right, but they’re all text. They sit on the left side of the cells, and the four-decimal number format on column B is ignored, so 0.25 shows 3.958635163302 instead of 3.9586.

And if you try to total them, the SUM function skips text, so you get 0.

Here is the CSCH formula to enter in cell C2:

=CSCH(A2:A11)
CSCH in C2 returns real numbers shown with four decimals

CSCH returns actual numbers, so the four-decimal format works and you can total or chart them like any other numbers. It also accepts a range directly, so it spills without the plus-sign trick.

So use CSCH for regular numbers, and keep IMCSCH for values that have an imaginary part.

If you already have IMCSCH results for regular numbers, like the ones in column B, the IMREAL function turns them into real numbers. For example, =IMREAL(+B2:B11) returns the same values as the CSCH column.

If you are using Excel 2019 or earlier, enter the below formula in cell B2 and then copy it down the range:

=IMCSCH(A2)

And for the CSCH results, enter the below formula in cell C2 and then copy it down the range:

=CSCH(A2)

Example 6: Why IMCSCH Returns #NUM! or Odd Results

IMCSCH is picky about its input, and a few inputs give results that look wrong at first. This example puts the common ones side by side.

Below is a list of inputs that cause errors or surprising results, and I want to see what IMCSCH returns for each one in column C.

Test inputs that cause errors or surprising IMCSCH results with an empty result column

Here is the formula to enter in cell C2:

=IMCSCH(+B2:B8)
IMCSCH in C2 returns #NUM!, #VALUE!, a huge value and 0 for the test inputs

Here’s what’s going on in each row:

  • Uppercase I (4+3I): IMCSCH only recognizes a lowercase i or j, so it returns the #NUM! error.
  • Imaginary part first (3i+4): the real part has to come first, so this also returns #NUM!. Write it as 4+3i instead.
  • Zero and an empty cell: the hyperbolic sine of 0 is 0, and 1 can’t be divided by 0, so IMCSCH returns #NUM!. An empty cell counts as 0, so it gives the same error.
  • Logical value (TRUE): IMCSCH returns the #VALUE! error for TRUE or FALSE.
  • Pi times i: this is another point where the hyperbolic sine is 0, so the true answer doesn’t exist. But PI() is accurate to only 15 digits, so Excel gets a tiny number instead of 0, and dividing by it gives the huge -309488357722796i.
  • Large real number (800): the true result is so small that Excel can’t store it, so IMCSCH returns 0.

The pi times i case is the one to watch, because there’s no error to warn you. The same thing happens at other whole multiples of pi times i, such as 2 pi times i.

So these are some practical ways to use the IMCSCH function in Excel to find the hyperbolic cosecant of complex numbers.

Just remember to put a plus sign in front of a range when you want one formula for a whole column, and use CSCH when your numbers have no imaginary part. I hope you found this article helpful.

List of All Excel Functions

Other Excel Articles You May Also Like:

Sumit Bansal

Sumit Bansal

13x Microsoft Excel MVP

Hey! I'm Sumit Bansal, founder of trumpexcel.com and a Microsoft Excel MVP. I started this site in 2013 because I genuinely love Microsoft Excel (yes, really!) and wanted to share that passion through easy Excel tutorials, tips, and Excel training videos. My goal is straightforward: help you master Excel skills so you can work smarter, boost productivity, and maybe even enjoy spreadsheets along the way!

Get the FREE 51 Excel Tips Ebook

Enter your details and the free PDF is on its way to your inbox.

Hmm, that didn't go through. Please check your email and try again.

No spam. You'll also get my weekly Excel newsletter. Unsubscribe anytime.

Check your inbox!

The ebook is on its way to your email. It usually lands within a couple of minutes.