How to Fix Excel CORREL Errors Caused by Text Values
Question details
The user needs to resolve a calculation failure with the CORREL function resulting from numeric data or times being formatted and stored as text.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Calculating the correlation coefficient between two data ranges using the CORREL function.
- Observed behavior
- The CORREL calculation fails or returns an error because one or both ranges contain text values, incorrect decimal separators, or unequal array lengths.
Before modifying your formulas, ensure that both data arrays have the exact same number of rows and check for any visually obvious formatting inconsistencies.
Convert Text to Numbers and Correct Decimal Separators
Fix the error by converting times and text-stored numbers into proper numeric formats and ensuring array lengths match.
The CORREL function requires two strictly numeric ranges of equal length. If numbers are imported with the wrong decimal separator (like a comma instead of a period), Excel may treat them as text, causing the formula to fail.
Use the ISNUMBER function (e.g., =ISNUMBER(A2)) in an adjacent column to check if Excel recognizes your time or decimal values as actual numbers.
Highlight the affected column, press Ctrl+H to open Find and Replace, type a comma (,) in the 'Find what' box and a period (.) in the 'Replace with' box, then click 'Replace All'.
Select the corrected data ranges, right-click and choose 'Format Cells'. Under the Number tab, select 'Number' and click OK.
In your result cell, type =CORREL(A2:A10, B2:B10) and press Enter. Ensure both ranges (A2:A10 and B2:B10) have the exact same number of entries.

Easily Calculate Data Correlation with WPS Spreadsheet
WPS Spreadsheet provides intuitive data formatting tools and smart error-checking to help you quickly identify numbers stored as text, ensuring your CORREL formulas work seamlessly.
- 1. Import your data: Open your dataset in WPS Spreadsheet.
- 2. Convert text to numbers instantly: Click the warning icon next to any cells containing numbers stored as text and select 'Convert to Number'.
- 3. Apply the CORREL formula: Select an empty cell, input =CORREL(Array1, Array2), and press Enter to instantly calculate the correlation.

Frequently Asked Questions
Why does the CORREL function return a #N/A error?
A #N/A error occurs when the two arrays supplied to the CORREL function have a different number of data points. To fix this, ensure both ranges (e.g., A2:A20 and B2:B20) are exactly the same size.
How does the CORREL function handle empty cells or text?
If an array contains text, logical values, or empty cells, the CORREL function ignores those values. However, if this causes the number of valid data points in the two arrays to mismatch, the function will fail.
Can I use the VALUE function to fix text numbers?
Yes. You can create a helper column and use the =VALUE(A2) function to force text strings that look like numbers into actual numeric values, which can then be used in your CORREL formula.




