Check if there is a decimal point
Your examples are not very clear, but based on what you have provided, I
think this will work:
Sub test()
Dim strText As String
strText = "1234"
strText = Replace(strText, ".", "")
strText = Left(strText, Len(strText) - 2) & "." & Right(strText, 2)
End Sub
--
Hope that helps.
Vergel Adriano
"Janos" wrote:
Hello,
Within a for loop i need to check if and where a value has a decimal point,
and then amend/add a decimal point. Ie:
100.11 - 100.11
100.1 - 10.01
100 - 1.00
I have tried convoluted ways o check such as Right(Left(c.value,3),1)="."
but it doesn't ever want to...
Any ideas, suggestions?
Much Appreciated,
Janos
|