Forum Discussion

Ifono78bezeqint's avatar
Ifono78bezeqint
Copper Contributor
Jun 17, 2021
Solved

Text to Number conversion

Recently I exported my bank statement to an Excel spreadsheet. The export worked fine except that negative values were exported as text not as numbers (bad practice by the bank programmers…). Tried to convert the text to number with the recommended methods in Help but to no avail.

Then tried the function  VALUE() with its argument the cell with the negative number as text. It returned a #VALUE! error. I selected the Show Calculation Steps from the error context menu and the text correctly appeared enclosed in double quotes. The next step evaluated to an error.

HOWEVER, if I manually typed the argument of the VALUE() function  exactly as it appeared in Show Calculation Steps, it returned the correct  number.

Here is an example: Assume that cell B2 has -180.00 as text.  The formula in C2 =VALUE(B2) evaluates to #VALUE! error. The first step in Show Calculation Steps looks like VALUE(“-180.00”).  The next step is an error.

If, however, I manually type in C2    =VALUE(“-180.00”) then it returns the correct answer as the negative number -180.00.

It drives me nuts!

Thanks,

Ilan

9 Replies

  • JMB17's avatar
    JMB17
    Bronze Contributor
    In my experience, sometimes the "-" in imported data is not the same "-" on the keyboard that you are keying. Try going into a cell and selecting the "-" character, then copy it (ctrl+c), then escape, then do a find/replace - pasting (ctrl+v) the "-" character you copied from the data and replace it with the standard "-".
  • StoneKiwi's avatar
    StoneKiwi
    Iron Contributor
    Hi,

    This is likely a formatting issue so it is hard to diagnose the exact cause without an example spreadsheet.
    You are right that =VALUE should work.
    You could try =TEXT(cellwithvalue,"####") to format it as a number.
    If that doesn't work just attach an example spreadsheet that has the error. Remove any personal/sensitive information before sharing.

    StoneKiwi



Resources