ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Convert numbers stored as text to numbers (https://www.excelbanter.com/excel-discussion-misc-queries/242930-re-convert-numbers-stored-text-numbers.html)

Gary''s Student

Convert numbers stored as text to numbers
 
Select the cells you want to convert and run this small macro:

Sub MakeNumber()
Dim v As Variant
For Each r In Selection
v = Replace(Replace(r.Value, " ", ""), ",", "")
r.Clear
r.Value = Val(v)
Next
End Sub

--
Gary''s Student - gsnu200903


"NONTO" wrote:

I copied data from my online bank statement on to excel. I tried to sum the
numbers and realised that the answer was in correct. I formatted the numbers
to account but still it was incorrect. I realised that if I dragged my cursor
over the columns the sum at the bottom of the sreen added some number and
left out others. I the sought help from the help menu, followed the process
where I typed '1' on a clean cell, copied it, paste special, chose add but it
did not work, I reapeted the process and chose 'multiply' instead but it
still did not work.

I tried the F2 enter procedure but it not work.

Whilst playing around trying to figure out the solution I got to a screen
that showed me that the numbers that were not adding up had " at the begining
and at the end, e.g "2496.48" + 2800 gave me a value error.

How can i change these values into numbers without retyping them, because it
is a lot of data.

--
IF GOD IS FOR US WHO CAN BE AGAINST US?



All times are GMT +1. The time now is 05:56 PM.

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