Function ADD Expects Number Values in Google Sheets

Google Sheets returns #VALUE! when ADD cannot coerce a value such as 12 g to a number. The message names parameter 1 or 2; convert that text.

本文目录

The same #VALUE! in this file named a different parameter depending on which side of the plus sign held the unusable text.

=C4+2

The message was: Function ADD parameter 1 expects number values. But '12 g' is a text and cannot be coerced to a number.

=2+C4

The message was: Function ADD parameter 2 expects number values. But '12 g' is a text and cannot be coerced to a number.

ADD is the operator behind +. Parameter 1 is the left value, parameter 2 is the right value. The fix is to make that named value a number, not to hide the error.

The weights come from this seed-packet log in A1:C9:

PacketSeedWeight
P-11calendula12
P-12borage12
P-13nigella12 g
P-14chia12
P-15sorrel
P-16anise8 g
P-17fennel8
P-18dilln/a

C2 is the number 12. C3 looks like 12 but is stored as text. C4 is the text 12 g. C5 is the text 12 with a trailing space, which does not show in the table. Adding a packing allowance of 2 is the check used below.

A number, and a plain text number, both added

=C2+2

returns 14. ISTEXT(C2) is FALSE, and ISNUMBER(C2) is TRUE.

=C3+2

also returns 14. ISTEXT(C3) is TRUE, and ISNUMBER(C3) is FALSE, but Sheets still coerced the digits to a number. VALUE(C3) returns 12.

A trailing space in C5 did not block that coercion: =C5+2 returned 14. A blank weight in C6 plus 2 returned 2. None of those cells produced the ADD message.

A unit, or other non-numeric text, will not coerce

C4 is 12 g. =C4+2 与 =2+C4 both return #VALUE!, with the two messages above. Multiplication and subtraction name their own functions but follow the same rule:

=C4*2

returns #VALUE!: Function MULTIPLY parameter 1 expects number values. But '12 g' is a text and cannot be coerced to a number.

=C2-C4

returns #VALUE!: Function MINUS parameter 2 expects number values. But '12 g' is a text and cannot be coerced to a number.

The label n/a in C9 fails the same way. =C9+2 returned #VALUE!: Function ADD parameter 1 expects number values. But 'n/a' is a text and cannot be coerced to a number.

The broader #VALUE! guide covers other wrong-type cases. This page is only the operator message that names ADD, MULTIPLY, or MINUS.

Convert the text, then add

If the cell is already a plain numeric string, enter it as a number, or use VALUE. VALUE(C3) returned 12. VALUE does not get you past a unit:

=VALUE(C4)

returns #VALUE!: VALUE parameter '12 g' cannot be parsed to number.

Strip the non-numeric characters first:

=VALUE(REGEXREPLACE(C4,"[^0-9.]",""))

This returned 12 for 12 g. Once that result is a number, adding 2 is the same operation that returned 14 from C2.

If the weights should be numbers going forward, type 12 instead of 12 g and keep the unit in a heading or a separate column. For other ways to turn a stored text number into a real number, see convert text to numbers. For pulling digits out of a longer string, see extract numbers from text.

Read the message before wrapping the formula. If it names parameter 1, inspect the left operand. If it names parameter 2, inspect the right one. ISTEXT 与 ISNUMBER tell you whether a cell that looks like 12 is actually a number.

Oscar

写 Excel 与 Google Sheets 的公式和排错。

Google Sheets, 19 November 2026, new private unshared spreadsheet (locale en_US, 1000-row grid). Formulas were entered as user input through the Sheets API. Error text was read from the Sheets API error message. C2 held the number 12 (ISTEXT FALSE, ISNUMBER TRUE); C2+2 returned 14. C3 held the text 12 (ISTEXT TRUE, ISNUMBER FALSE); C3+2 returned 14, and VALUE(C3) returned 12. C4 held the text 12 g; C4+2 returned #VALUE!, "Function ADD parameter 1 expects number values. But '12 g' is a text and cannot be coerced to a number." 2+C4 returned #VALUE!, "Function ADD parameter 2 expects number values. But '12 g' is a text and cannot be coerced to a number." C4*2 returned #VALUE!, "Function MULTIPLY parameter 1 expects number values. But '12 g' is a text and cannot be coerced to a number." C2-C4 returned #VALUE!, "Function MINUS parameter 2 expects number values. But '12 g' is a text and cannot be coerced to a number." VALUE(C4) returned #VALUE!, "VALUE parameter '12 g' cannot be parsed to number." VALUE(REGEXREPLACE(C4,"[^0-9.]","")) returned 12. C5 held 12 with a trailing space; C5+2 returned 14. A blank weight in C6 plus 2 returned 2. C9 held n/a; C9+2 returned #VALUE!, "Function ADD parameter 1 expects number values. But 'n/a' is a text and cannot be coerced to a number." Excel was not run.

本主题下一篇:表格错误与动态数组 NUMBERVALUE Returns #NAME? in Google Sheets