How to Fix the #VALUE! Error

#VALUE! means a formula received the wrong type of data, most often text where it expected a number or a date. Hidden spaces and imported numbers that are really text are the usual cause. Describe your calculation below and get a formula that copes with messy data.

Free, no sign-up required · 5 free generations a day

Last updated

Describe your task, get the formula

Type what you need in plain English, or pick an example below. You get the formula, a step-by-step explanation, and a worked example.

Formulas that fix #VALUE!

Syntax
=SUM(A2:A10)
=VALUE(TRIM(A2))*B2
=IFERROR(A2*B2,0)

SUM ignores text cells, while adding them with + does not, so =A2+A3 fails where =SUM(A2:A3) works. VALUE(TRIM()) converts a number stored as text, with stray spaces, into a real number. IFERROR is the last resort: it hides the error without fixing the data.

Examples

Add cells that may contain text

=SUM(A2,B2,C2)

SUM skips any cell that holds text, so one bad cell does not break the total. The same cells added with =A2+B2+C2 return #VALUE!.

Convert text to a number before calculating

=VALUE(TRIM(A2))*B2

TRIM strips spaces around the value and VALUE turns the cleaned text into a number, which can then be multiplied by B2.

Subtract dates that are stored as text

=DATEVALUE(B2)-DATEVALUE(A2)

DATEVALUE converts a text date into a real date serial number. The subtraction then returns the number of days between the two dates.

Common mistakes and how to fix them

A cell looks empty but breaks the formula

The cell contains a space or an empty string returned by another formula. Check it with =LEN(A2). Clear the cell, or wrap the reference in N() or VALUE(TRIM()).

#VALUE! from SUMPRODUCT or an array formula

The ranges are different sizes, for example A2:A100 against B2:B99. Every range in SUMPRODUCT must have the same number of rows and columns.

#VALUE! from FIND or SEARCH

The text you searched for is not in the cell. Wrap the function in IFERROR, or test with ISNUMBER(SEARCH(...)) to get TRUE or FALSE instead of an error.

Frequently asked questions

What does #VALUE! mean?

It means a value in the formula is the wrong type. The formula expected a number, date or single cell and got text, a text-formatted number, or a range it could not use.

How do I find the cell that causes it?

In Excel select the cell and use Formulas, Evaluate Formula to step through the calculation. You can also test each input with =ISNUMBER(A2); FALSE marks the cell that is text.

How do I convert a whole column of text numbers?

Select the column and use Data, Text to Columns, Finish in Excel, or multiply the cells by 1 in a helper column with =A2*1. In Google Sheets use Format, Number, Number.

Don't want to write it by hand?

Describe what you need in plain English and get a ready-to-use formula in seconds.

Try the formula generator