View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default 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?