ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Convert extracted number - Paste Special / Add (https://www.excelbanter.com/excel-programming/317779-convert-extracted-number-paste-special-add.html)

andibevan

Convert extracted number - Paste Special / Add
 

Hi All,

I am trying to automate part of a manual process which I regularly hav
to do.

I extract some data from a tool but when it is inputted into excel
some of the columns are stored as text not a number (i.e. format).
This prevents me performing calculations and I am unable to resolve i
by simply changing the format.

I therefore have to copy the relevant column and then "Paste Special
Add" to a blank column so that they are recognised as numbers.

Is there a simple way of converting numbers from the "text format" t
"numerical" format.

i.e.

Cell A1 = 1 -------------------- Cell A1 =1
Format = text Format = number

Thanks

And

--
andibeva
-----------------------------------------------------------------------
andibevan's Profile: http://www.excelforum.com/member.php...nfo&userid=988
View this thread: http://www.excelforum.com/showthread.php?threadid=32034


Harald Staff

Convert extracted number - Paste Special / Add
 
Hi Andy

Select the cells in question and run this little macro:

Sub MakeNumbers()
Dim Cel As Range
For Each Cel In Selection
If Cel.HasFormula = False Then
If IsNumeric(Cel.Value) Then
Cel.Value = Cel.Value * 1
End If
End If
Next
End Sub

HTH. Best wishes Harald

"andibevan" skrev i melding
...

Hi All,

I am trying to automate part of a manual process which I regularly have
to do.

I extract some data from a tool but when it is inputted into excel,
some of the columns are stored as text not a number (i.e. format).
This prevents me performing calculations and I am unable to resolve it
by simply changing the format.

I therefore have to copy the relevant column and then "Paste Special /
Add" to a blank column so that they are recognised as numbers.

Is there a simple way of converting numbers from the "text format" to
"numerical" format.

i.e.

Cell A1 = 1 -------------------- Cell A1 =1
Format = text Format = number

Thanks

Andy


--
andibevan
------------------------------------------------------------------------
andibevan's Profile:

http://www.excelforum.com/member.php...fo&userid=9882
View this thread: http://www.excelforum.com/showthread...hreadid=320345





All times are GMT +1. The time now is 01:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com