Converting numbers to alpha
Closed
rodgerdaye
RayH - Jan 6, 2015 at 04:51 PM
- Posts
- 1
- Registration date
- Tuesday January 6, 2015
- Status
- Member
- Last seen
- January 6, 2015
RayH - Jan 6, 2015 at 04:51 PM
Related:
- Converting numbers to alpha
- Mp3con converter - Download
- Jpg converter free download - Download
- Iwisoft free video converter - Download
- All to mp3 converter - Download
- Nxxxa ace video converter free download for windows 7 64 bit - Download
1 reply
That cannot work as there are only 9 characters in 'Graystoke'.
The string would have to be 10 long.
For strings that are 10 long values (GraystokeX), a $5.90 would be "s.eX".
Where Zeros are counted as position 10.
Is that right?
in a cell put:
=convertalpha(A1,B1)
where A1 is the string (GraystokeX)
and B1 is the value (5.90)
The string would have to be 10 long.
For strings that are 10 long values (GraystokeX), a $5.90 would be "s.eX".
Where Zeros are counted as position 10.
Is that right?
Public Function convertalpha(compstring As Variant, myvalue As Currency) As String
Dim x As String
Dim y as String
Dim n As Integer
Dim newvalue As String
y = CStr(compstring)
x = CStr(Format(myvalue, "######.00"))
For n = 1 To Len(x)
pos = Mid(x, n, 1)
If pos = 0 Then pos = 10
If Mid(x, n, 1) = "." Then
char = "."
Else
char = Mid(y, pos, 1)
End If
newvalue = newvalue & char
Next n
convertalpha = newvalue
End Function
in a cell put:
=convertalpha(A1,B1)
where A1 is the string (GraystokeX)
and B1 is the value (5.90)