1. At start, select whole range where numeric values must be, and format the range as General or Number. NB! Setting the format doesn't convert any entries to numbers when they were text before, but it is a condition needed for all next steps to be successful;
2. When the numbers must have decimals, check, what is decimal delimiter in your Window settings, and compare this with your data (you can check this easily in some empty cell - enter the formula =1/2, and look at result. Is it 0.5 or 0,5. When all your data have decimal values and delimiter is different, a simple REPLACE operation over range with values to convert will do. When there are also integer values, then those cells remain text (but when you have wrong delimiter in datarange, then replacig it is MUST anyway;
3. Select some non-converted entry and look at it in formula field at top of sheet. When the entry is preceded with apostrophe (like '123), another REPLACE is needed (' with nothing). And I'm not entirely sure, but leading/trailing spaces or especially spaces entered between thousands groups may be also culprit - in this case REPALCE is also easiest to use;
4. And as last step (or second, when there was no need for steps 2 and 3), enter e.g. number 1 or 0 into some free cell, copy the cell (Ctrl+C), select the datarange, use PasteSpecial from right-click menu, and select then Multiply or Add (depending on the value you copied).
Or select a cell, press F2, and then press Enter - for every cell in datarange.
|