Fix Excel Regression Non-Numeric Errors Caused by IMDIV Formulas
Question details
The user is encountering a non-numeric data error when performing regression analysis in Excel, which is caused by formula results generated using the IMDIV function.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Running a regression analysis on a dataset containing calculated values.
- Observed behavior
- The regression analysis tool fails and reports that the data contains non-numeric values, even though no visible errors appear in the cells.
Before troubleshooting, ensure that your dataset is intended for standard real-number statistical analysis and not complex-number operations, as this determines the correct division method.
Replace IMDIV with Standard Division
Change your formula to use the standard division operator to ensure the output is recognized as a numeric value for regression analysis.
The IMDIV function is specifically designed to calculate the quotient of two complex numbers. Because complex numbers in Excel are represented as text strings (e.g., 'x+yi'), the result of an IMDIV formula is inherently formatted as text. The regression analysis tool requires pure numeric data and will throw an error when it encounters these text-string results.
Select the column containing your calculated data and review the formula bar to identify cells using the IMDIV function.
Edit the formula by replacing '=IMDIV(A2, B2)' with the standard division operator, such as '=A2/B2'.
Press Enter, then drag the fill handle down to apply the standard division formula to the rest of the column.
Go to the Data tab, select Data Analysis, choose Regression, and run your analysis again using the newly calculated numeric data.

Convert Text-Formatted Complex Numbers to Real Numbers
If you must use IMDIV but only need the real coefficient of the complex number for your regression, extract it using the IMREAL function.
Perform Regression Analysis Seamlessly in WPS Spreadsheet
WPS Spreadsheet provides robust data analysis tools, including Regression, and fully supports standard arithmetic and advanced engineering functions with high compatibility.
- 1. Open your dataset in WPS Spreadsheet: Launch WPS Office, open your spreadsheet, and ensure your data uses standard division for real numbers.
- 2. Enable Data Analysis Tools: Go to the Data tab. If you do not see Data Analysis, enable the Analysis ToolPak add-in from the Options menu.
- 3. Select Regression: Click on Data Analysis, choose Regression from the list, and click OK.
- 4. Configure and Run: Input your Y and X ranges, select your output preferences, and click OK to instantly generate your statistical summary.

Frequently Asked Questions
Why does the IMDIV function return a text value instead of a number?
IMDIV is an engineering function built to divide complex numbers. Because complex numbers contain imaginary units (like 'i' or 'j'), the spreadsheet program outputs the result as a text string to display the full complex number format accurately.
How can I easily spot non-numeric values in my Excel columns?
You can use the '=ISNUMBER()' function, which returns TRUE for numbers and FALSE for text. Alternatively, you can select the column, press F5 (Go To), click Special, and select 'Constants' with only 'Text' checked to highlight non-numeric cells.
Does the Regression tool in Excel support complex numbers?
No, the Data Analysis Regression tool strictly requires standard numeric inputs. It cannot calculate regressions on complex numbers or text strings, which is why functions like IMDIV cause errors during regression analysis.
Is there a way to force the regression tool to ignore text?
The regression tool requires contiguous numeric data. You cannot force it to ignore text inline; you must either clean your dataset to remove text, extract the numeric portions, or replace engineering functions with standard arithmetic operators before running the analysis.




