Forum Discussion

Charly3's avatar
Charly3
Copper Contributor
Jun 02, 2026

Error on regression analysis

Hello everyone,

I want to perform a regression analysis on my survey data, but I keep getting this error message: “Regression - The RGP() function returns an error value. Check the input ranges.” I’ve since figured out that it’s due to a specific row, but I couldn’t find any incorrect numbers, letters, or anything else in it that would trigger this message. Does anyone know what might be causing this and how I can fix the problem? 

Thanks in advance!

1 Reply

  • NikolinoDE's avatar
    NikolinoDE
    Platinum Contributor

    When a single row breaks Excel's regression (RGP() or Analysis Toolpak), the cause is almost always one of three things:

    1. A non‑numeric value in that row – even a space, an empty string (""), or a number stored as text (green triangle).
    2. An error value – like #N/A or #VALUE!.
    3. A hidden range mismatch – removing the row accidentally aligns your X and Y ranges, which suggests the original ranges had different row counts.

     

    To fix it quickly:
    On the problematic row, use =ISTEXT(cell) and =ISERROR(cell) across your columns to find the offending cell. Then clean it with Text to Columns (Data tab) or a formula like =TRIM(cell)+0.

     

    The "small numbers bug" and "Labels checkbox" are unlikely to be the issue here – they don't cause a single specific row to fail.

     

    Hope this helps🙂