
Though one might get creative with string building techniques and something like OFFSET() to ease that pain. So it would have to be copied down a column or used multiple times in a formula rather than as a simple SUM() formula. The cell reference is in the MID() so using a range gets one single reallllly long joined value (so if summing 6 numbers, each 3-4-5 digits long, one would ahve a resulting single number of 18 to 30 digits rather than six separate numbers). (One place, easy to locate, no hunting through 23 lines of formula looking for all instances of A1 or using Find & Replace only to find out the string A1 occurs in other ways in the formula.) =VALUE(TEXTJOIN("",TRUE,IFERROR(VALUE(MID(A1,SEQUENCE(1,LEN(A1)),1)),"")))Īnd one can use LET(), as in: "LET( Value, A1, etc.)", to allow that A1 which occurs twice to exist in only the one place at the start of the formula allowing easy editing of the cell referred to. But there is a slightly different approach formula that keeps anything of that sort using a list you create or populate: It DOES ignore numerical assistants like "-", ",", and "." as well as fellow travellers such as "(", ")", "_", and any currency markers. The following formula will strip out JUST numerical characters and turn them into a single value. That is why it is safest to use if the range only contains numeric values formatted as text. If you try these three steps on a range of cells that has text containing spaces or tabs, it is possible that you could overwrite data in columns to the right of the selected range. Excel displays the Convert Text to Columns Wizard. Click the Text to Columns tool in the Data Tools group.If the range you want to convert contains only numbers formatted as text and not any actual text, then the following steps work well: The result is that a zero value (what Excel assumes for a blank cell) is added to the target values and they are converted, again, to numbers. When it comes to step 6, choose Add instead of Multiply. You could also, if desired, select a blank cell in steps 1 and 2. Since any number multiplied by one is that same number, you effectively force Excel to replace the contents of the cell with the numerical equivalent of the text that was previously there. This works because Excel multiples each cell in the range (step 3) by the value in the Clipboard and then again stores the value in the cell. Make sure the Multiply radio button is selected.Excel displays the Paste Special dialog box. Click the down-arrow under the Paste tool and choose Paste Special from the resulting choices.Select the range of cells you want to convert to numbers.If you don't see the exclamation mark icon when you select the cells, then you can use a different method to do the conversion: Excel immediately changes the format on the cells (to General) and converts the text values to numbers. You want to select the Convert to Number option. (See Figure 1.)Ĭlick the icon and some options appear. You may see a small exclamation mark icon appear near the upper-left corner of the selected cells. The following three solutions, however, seem to be the easiest and quickest.įirst, select the cells that are formatted as text, but that actually contain numbers. There are several different ways you can force the conversion of forced text into numeric values, ranging from macros to using formulas in other columns to perform the conversion. It is possible to remove the text formatting attribute from the cells you want to sum, but that won't cause Excel to reassess the contents of the cells and treat them as numbers or dates, where appropriate. The SUM function ignores any cells formatted as text. To make matters tricky, however, if you use the SUM function (which most people do when summing an entire column or row), then you won't get the proper sum. If you use a formula such as the following, then Excel has no problem:Įxcel provides the correct sum, provided at least one of the cells (A1 or A2) was not formatted as text. For instance, you may decide that you want to add up the contents of cells that are formatted as text. Of course, forcing Excel to treat your input as text can have unwanted repercussions later. When you do, the information in the cell is always treated as text. You can overcome this natural tendency of Excel by formatting a cell as text before entering information in it. If your entry can be translated as a number or a date, then Excel treats it that way. When you enter information in a worksheet, Excel does its best to decipher what type of data you are entering.
