myliang/x-spreadsheet

Arithmetic with strings

SheetJSDev opened this issue · 3 comments

Set cell A1 to the string "1x" (no quotes) and cell B1 to the number 2. Enter the formula =A1*B1 in cell C1.

nan

Cell C1 will have the value "2*NaN"

1x is not number

The expected result is some sort of NaN or error. Excel / Google Sheets generates a #VALUE! error. Numbers shows the error message "The operator “*” expects a number, but cell A1 contains a string.". "2*NaN" looks like a hybrid of numeric and text interpretations

yep, will fix this