Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 268
Default Converting numbers stored as text into number-format

I haven't seen your file but.........
Select an empty cell, press <Ctrl<C Select the range of text you wish to
convert. Right click, select Paste Special, tick Add and click on OK. Your
text should now be numerals

"Eirik Sævareid" wrote:

When issuing a report, I have a need for extracting data from a production
control system. The data are being saved in HTML-format, and then saved
into Microsoft Excel.

The numbers then occur stored as text-format in Excel. I have not succeded
when trying to convert them into number-format (the numbers are going to be
used in further calculations). Please see the attached Microsoft
Excel-file. Have anybody the solution for my problem ?

The report is bigger than the sample in the attached spreadsheet.

All help will be greatly appreciated.


Best regards,

Eirik Sævareid



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Converting numbers stored as text into number-format

Enter and run this small macro:


Sub numerify()
Dim r As Range
Count = 0
For Each r In ActiveSheet.UsedRange
If Application.IsText(r.Value) Then
If IsNumeric(r.Value) Then
r.Value = 1# * r.Value
r.NumberFormat = "General"
Count = Count + 1
End If
End If
Next
MsgBox (Count & " cells changed")
End Sub
--
Gary's Student


"Eirik Sævareid" wrote:

I am sorry, but nothing happens when I try that...(nothing is copied).
Maybe I misunderstood or I do somehting wrong...

Eirik

"kassie" skrev i melding
...
I haven't seen your file but.........
Select an empty cell, press <Ctrl<C Select the range of text you wish

to
convert. Right click, select Paste Special, tick Add and click on OK.

Your
text should now be numerals

"Eirik Sævareid" wrote:

When issuing a report, I have a need for extracting data from a

production
control system. The data are being saved in HTML-format, and then saved
into Microsoft Excel.

The numbers then occur stored as text-format in Excel. I have not

succeded
when trying to convert them into number-format (the numbers are going to

be
used in further calculations). Please see the attached Microsoft
Excel-file. Have anybody the solution for my problem ?

The report is bigger than the sample in the attached spreadsheet.

All help will be greatly appreciated.


Best regards,

Eirik Sævareid






  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 268
Default Converting numbers stored as text into number-format

Hi Erik

Numerals entered as text are left aligned. When you copy an empty cell,
then select a cell with left aligned numerals, right click and selct Paste
Special, tick the Add box and click on OK, Excell adds the value 0 to the
cell you are pasting to. The contents of the cell should then right align.
You have to highlight the range you want to change. Say for example you have
an empty cell in range K1. Go to K1, press <Ctrl<C, and without doing
anything else in between, select your data range. Let's say this range is
A2:A50. You block range A2:A50, move your cursor anywhere in this range,
right click your mouse, select Paste Special. In the window that pops up,
make sure you tick Add, and click on OK. If your cell contents do not right
align, there may be another problem. You may have spaces between digits,
such as 123 456, iso 123456. If you post examples of your data, maybe
someone can help you. Uploading the file does not always work, though. If
you still cannot resolve the issue, send me your file to
jDOTkasselmanATlanticDOTnet. Just change the address to the correct signs

"Eirik Sævareid" wrote:

I am sorry, but nothing happens when I try that...(nothing is copied).
Maybe I misunderstood or I do somehting wrong...

Eirik

"kassie" skrev i melding
...
I haven't seen your file but.........
Select an empty cell, press <Ctrl<C Select the range of text you wish

to
convert. Right click, select Paste Special, tick Add and click on OK.

Your
text should now be numerals

"Eirik Sævareid" wrote:

When issuing a report, I have a need for extracting data from a

production
control system. The data are being saved in HTML-format, and then saved
into Microsoft Excel.

The numbers then occur stored as text-format in Excel. I have not

succeded
when trying to convert them into number-format (the numbers are going to

be
used in further calculations). Please see the attached Microsoft
Excel-file. Have anybody the solution for my problem ?

The report is bigger than the sample in the attached spreadsheet.

All help will be greatly appreciated.


Best regards,

Eirik Sævareid






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help converting Number stored as Text to Date LuvHaleiwa Excel Discussion (Misc queries) 4 December 21st 07 08:09 PM
Converting numbers stored as dates to text in Excel David from Furdale Excel Discussion (Misc queries) 1 July 17th 06 06:34 PM
macro for converting number stored as "text" (or preceeded with ') to "number" formatting markx Excel Programming 1 June 30th 06 12:14 PM
Number stored as text. How do I keep the number format? staying[_5_] Excel Programming 5 June 14th 06 04:57 AM
how to format numbers stored as text or vice versa to use vlookup teneagle Excel Worksheet Functions 1 February 3rd 05 10:41 PM


All times are GMT +1. The time now is 09:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"