excel 2002 convert numbers to mathematical

anon125

Active Member
i copied numbers from an online account.
pasted them into excel 2002.
how do i convert the numbers to numbers i can multiply etc?
i tried putting a 1 into a cell then copying and paste special multiply

tried converting the cell to numbers

thanks all
 
Last edited:

Joe4

MrExcel MVP, Junior Admin
Try doing a "Text to Columns" on the column, i.e. highlight the whole column, select "Text to Columns" from the Data menu, and click Finish.
Does that fix them?
 

anon125

Active Member
tried =a1+0
the following does not make sense. i have no rules section

  • To do this in Microsoft Excel 2002 or in Microsoft Office Excel 2003, follow these steps:
    • On the Tools menu, click Options.
    • In the Options dialog box, click the Error Checking tab.
    • In the Settings section, click to select the Enable background error checking check box.
    • In the Rules section, make sure the Number stored as text rule is selected, and then click OK.
    To do this in Microsoft Office Excel 2007, follow these steps:
    • Click the Microsoft Office Button, and then click Excel Options.
    • On the Formulas tab, click to select the Enable background error checking check box in the Error Checking section.
    • Under Error checking rules, make sure that the Numbers formatted as text or preceded by an apostrphe check box is selected, and then click OK.
  • On the Error Checking Options button, click the down arrow.

    Notice that the Number Stored as Text menu appears.
  • Click Convert to Number.
Notice that the cell is converted to the number format and the Error Indicator no longer appears in the cell.
 
Last edited:

joeu2004

Well-known Member
It would help (us) if you uploaded an example Excel file to a file-sharing website and posted the download URL here.

My guess: the cells contain non-breaking spaces (HTML nbsp; ASCII 160). If so, try the following:

=--SUBSTITUTE(A1,CHAR(160),"")

The double negate converts text to a numeric value. Any idempotent arithmetic will do the same; for example, adding zero or multiplying by one.

Just in case the cells might contain other "invisible" characters (notably tab; ASCII 9), you might try the following:

=--CLEAN(SUBSTITUTE(A1,CHAR(160),""))
 

Rick Rothstein

MrExcel MVP
Are your "numbers" left justified? If so, they are text values. In order for that to be the case, I suspect you have some trailing non-breaking space attached to the numbers. Give this a try...

1) Select the column with your "numbers" in it.

2) Go into the VBA editor (ALT+F11) and type this into the Immediate Window and then press the Enter Key...

Selection.Replace Chr(160), "", xlPart, , , , False, False
 

anon125

Active Member
Thanks for trying Rick, but when i press Alt+F11 i just get a grey screen in the VBA editor. nowhere to type!
so i added a module and typed it there but to no avail.
what did i miss?
PS the numbers were links at first
 
Last edited:

anon125

Active Member
Try doing a "Text to Columns" on the column, i.e. highlight the whole column, select "Text to Columns" from the Data menu, and click Finish.
Does that fix them?
no but thanks
 

Joe4

MrExcel MVP, Junior Admin
Can you post an example of any number on your sheet, what it looks like?
Then, for that exact value, let's say it is in cell A1.
What does this formula return?
=LEN(A1)
 

MARK858

Well-known Member
Thanks for trying Rick....
what did i miss?
PS the numbers were links at first
and type this into the Immediate Window and then press the Enter Key...

Selection.Replace Chr(160), "", xlPart, , , , False, False
I think you missed the Immediate Window part, if you can't see it in the VBE click the View icon then click Immediate Window, it normally appears at the bottom of the window where you type your code. Please note that you might need to drag the top of it to expand it.
See the link below to see how it appears.

https://www.engram9.info/excel-2002-vba-xml-asp/using-the-immediate-window.html

Don't miss the previous post by Joe4
 
Last edited:

anon125

Active Member
Can you post an example of any number on your sheet, what it looks like?
Then, for that exact value, let's say it is in cell A1.
What does this formula return?
=LEN(A1)
Thanks
the length is indeed correct.
the numbers look like any other number. position is of course affected by the alignment buttons

thanks
 

Some videos you may like

This Week's Hot Topics

  • Importing multiple excel files into one spreadsheet
    Hi, I'm trying to import multiple excel files (with the same format into a single spreadsheet) so that each day's file is listed underneath the...
  • find many based on a certain criteria
    good evening, I hope someone can help me? I have a workbook sheet 2 contains lots of data.... I would like to be able to find anything on sheet...
  • How to copy multiple rows using If
    Hi all, I'm very new to VBA and have written this simple code to copy certain cells if a certain cell within that row contains any data. I need...
  • VBA If statement
    Dear All, I have two dates, where I'd like a message box to pop, if the dates are between this criteria. [CODE] sDate1 = #10/1/2019#...
  • Text Format
    I have a sheet for user to keyin the data. The format of the data can be 451 / 1903, 0012 / 9908 or 00287 / 0099. The number after the "/" is...
  • Syntax errors
    Good Morning, Trying to compile a workbook, I keep getting a few errors. Here are the first two: [code=rich]Syntax Error: Function...
Top