View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz[_2_] JLGWhiz[_2_] is offline
external usenet poster
 
Posts: 1,565
Default custom function to convert numbers stored as text

Not sure what you mean, but here is a function that will convert a string
value digit to an integer value.

Function MakeNum(rng As Range)
MakeNum = CInt(rng)
End Function

To use it, assume a string value of "123456" in cell b5:

In an empty cell put formula =MakeNum(b5) Enter.

"Josh Craig" wrote in message
...
Hi everyone,

I know you can convert text to numbers with the whole paste multiply by 1
thing but I was wondering if anyone had seen code (or would know what code
to
use) to convert numbers stored as text to numbers using a custom built VBA
function?

Any help greatly appreciated!

Josh