# Need to remove period from number/currency

I'm using VB6.

I need a function to take the following currency values:

2
5.5
1.83
4.4444
5.67
5.5
1.9373

And return the following:

200
550
183
444
567
550
194

Any suggestions where to start?  I need to test for the location of the period and see how many digits are on the right side.  I don't care if they are rounded up or not.  To be off one cent in this case will not matter.
LVL 4
###### Who is Participating?

Commented:
newNumber = Round(myNumber * 100)

S
0

Commented:
Try this

Dim MyNumber As Double
MyNumber = 1.9373
MyNumber = Left((Replace(MyNumber, ".", "") * 100), 3)
0

Author Commented:
Shauli, you are a genius.  I would have never thought of such a simple approach.  I have it installed and working well with your solution.  Thanks -HK
0

Commented:
You are most welcome :)

S
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.